Class LexoInteger
java.lang.Object
com.atlassian.greenhopper.model.lexorank.LexoInteger
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionadd
(LexoInteger other) int
complement
(int digits) boolean
format()
int
hashCode()
boolean
isOne()
boolean
isZero()
static LexoInteger
make
(LexoNumeralSystem sys, int sign, int[] mag) multiply
(LexoInteger other) negate()
protected static LexoInteger
one
(LexoNumeralSystem sys) static LexoInteger
parse
(String strFull, LexoNumeralSystem system) shiftLeft
(int times) shiftRight
(int times) subtract
(LexoInteger other) toString()
protected static LexoInteger
zero
(LexoNumeralSystem sys)
-
Field Details
-
NEGATIVE_SIGN
public static final int NEGATIVE_SIGN- See Also:
-
ZERO_SIGN
public static final int ZERO_SIGN- See Also:
-
POSITIVE_SIGN
public static final int POSITIVE_SIGN- See Also:
-
-
Method Details
-
add
-
subtract
-
multiply
-
negate
-
shiftLeft
-
shiftLeft
-
shiftRight
-
shiftRight
-
complement
-
complement
-
isZero
public boolean isZero() -
isOne
public boolean isOne() -
compareTo
- Specified by:
compareTo
in interfaceComparable<LexoInteger>
-
getSystem
-
format
-
parse
-
zero
-
one
-
make
-
equals
-
hashCode
public int hashCode() -
toString
-