com.atlassian.greenhopper.model.lexorank
Class LexoDecimal

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

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

Represents a decimal with a configurable numerical system.

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


Method Summary
 LexoDecimal add(LexoDecimal other)
           
 LexoInteger ceil()
           
 int compareTo(LexoDecimal o)
           
 boolean equals(java.lang.Object obj)
           
 LexoInteger floor()
           
 java.lang.String format()
           
static LexoDecimal from(LexoInteger integer)
           
 int getScale()
           
 LexoNumeralSystem getSystem()
           
static LexoDecimal half(LexoNumeralSystem sys)
           
 int hashCode()
           
 boolean isExact()
           
static LexoDecimal make(LexoInteger integer, int sig)
           
 LexoDecimal multiply(LexoDecimal other)
           
static LexoDecimal parse(java.lang.String str, LexoNumeralSystem system)
           
 LexoDecimal setScale(int nsig)
           
 LexoDecimal setScale(int nsig, boolean ceiling)
           
 LexoDecimal subtract(LexoDecimal other)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

half

public static LexoDecimal half(LexoNumeralSystem sys)

parse

public static LexoDecimal parse(java.lang.String str,
                                LexoNumeralSystem system)

from

public static LexoDecimal from(LexoInteger integer)

make

public static LexoDecimal make(LexoInteger integer,
                               int sig)

getSystem

public LexoNumeralSystem getSystem()

add

public LexoDecimal add(LexoDecimal other)

subtract

public LexoDecimal subtract(LexoDecimal other)

multiply

public LexoDecimal multiply(LexoDecimal other)

floor

public LexoInteger floor()

ceil

public LexoInteger ceil()

isExact

public boolean isExact()

getScale

public int getScale()

setScale

public LexoDecimal setScale(int nsig)

setScale

public LexoDecimal setScale(int nsig,
                            boolean ceiling)

compareTo

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

format

public java.lang.String format()

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.