com.atlassian.greenhopper.model.lexorank
Class LexoInteger

java.lang.Object
  extended by com.atlassian.greenhopper.model.lexorank.LexoInteger
All Implemented Interfaces:
java.lang.Comparable<LexoInteger>

public class LexoInteger
extends java.lang.Object
implements java.lang.Comparable<LexoInteger>

Represents an integer with a configurable numerical system.

Provides several arithmetic operations and convenience emthods to make it easier to do calculations.


Field Summary
static int NEGATIVE_SIGN
           
static int POSITIVE_SIGN
           
static int ZERO_SIGN
           
 
Method Summary
 LexoInteger add(LexoInteger other)
           
 int compareTo(LexoInteger o)
           
 LexoInteger complement()
           
 LexoInteger complement(int digits)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String format()
           
 LexoNumeralSystem getSystem()
           
 int hashCode()
           
 boolean isOne()
           
 boolean isZero()
           
static LexoInteger make(LexoNumeralSystem sys, int sign, int[] mag)
           
 LexoInteger multiply(LexoInteger other)
           
 LexoInteger negate()
           
protected static LexoInteger one(LexoNumeralSystem sys)
           
static LexoInteger parse(java.lang.String strFull, LexoNumeralSystem system)
           
 LexoInteger shiftLeft()
           
 LexoInteger shiftLeft(int times)
           
 LexoInteger shiftRight()
           
 LexoInteger shiftRight(int times)
           
 LexoInteger subtract(LexoInteger other)
           
 java.lang.String toString()
           
protected static LexoInteger zero(LexoNumeralSystem sys)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NEGATIVE_SIGN

public static final int NEGATIVE_SIGN
See Also:
Constant Field Values

ZERO_SIGN

public static final int ZERO_SIGN
See Also:
Constant Field Values

POSITIVE_SIGN

public static final int POSITIVE_SIGN
See Also:
Constant Field Values
Method Detail

add

public LexoInteger add(LexoInteger other)

subtract

public LexoInteger subtract(LexoInteger other)

multiply

public LexoInteger multiply(LexoInteger other)

negate

public LexoInteger negate()

shiftLeft

public LexoInteger shiftLeft()

shiftLeft

public LexoInteger shiftLeft(int times)

shiftRight

public LexoInteger shiftRight()

shiftRight

public LexoInteger shiftRight(int times)

complement

public LexoInteger complement()

complement

public LexoInteger complement(int digits)

isZero

public boolean isZero()

isOne

public boolean isOne()

compareTo

public int compareTo(LexoInteger o)
Specified by:
compareTo in interface java.lang.Comparable<LexoInteger>

getSystem

public LexoNumeralSystem getSystem()

format

public java.lang.String format()

parse

public static LexoInteger parse(java.lang.String strFull,
                                LexoNumeralSystem system)

zero

protected static LexoInteger zero(LexoNumeralSystem sys)

one

protected static LexoInteger one(LexoNumeralSystem sys)

make

public static LexoInteger make(LexoNumeralSystem sys,
                               int sign,
                               int[] mag)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2007-2014 Atlassian. All Rights Reserved.