net.damf.funkson.numbor
Class Numbor
java.lang.Object
java.lang.Number
net.damf.funkson.numbor.Numbor
- All Implemented Interfaces:
- java.io.Serializable
public class Numbor
- extends java.lang.Number
- See Also:
- Serialized Form
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
positive
private boolean positive
numerator
private GPNumber numerator
denominator
private GPNumber denominator
Numbor
public Numbor()
Numbor
public Numbor(int num)
Numbor
public Numbor(GPNumber num)
Numbor
public Numbor(int num,
int den)
Numbor
public Numbor(boolean pos,
int num,
int den)
Numbor
public Numbor(boolean pos,
GPNumber num,
GPNumber den)
sudoNumbor
private void sudoNumbor(boolean pos,
int num,
int den)
sudoNumbor
private void sudoNumbor(boolean pos,
GPNumber num,
GPNumber den)
fromString
public static Numbor fromString(java.lang.String str)
set
public void set(Numbor num)
getClone
public Numbor getClone()
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
addTo
public Numbor addTo(Numbor numbor)
getSum
public Numbor getSum(Numbor numbor)
multiplyBy
public Numbor multiplyBy(int num)
multiplyBy
public Numbor multiplyBy(Numbor numbor)
getProduct
public Numbor getProduct(int num)
getProduct
public Numbor getProduct(Numbor numbor)
divideBy
public Numbor divideBy(Numbor numbor)
getQuotient
public Numbor getQuotient(Numbor numbor)
negate
public Numbor negate()
getNegated
public Numbor getNegated()
getInverse
public Numbor getInverse()
getOppositeInverse
public Numbor getOppositeInverse()
simplify
public Numbor simplify()
recursiveSimplify
private GPNumber recursiveSimplify(GPNumber beginR)
isPositive
public boolean isPositive()
getSign
public byte getSign()
getNum
public GPNumber getNum()
getDenom
public GPNumber getDenom()
converToString
public java.lang.String converToString()
intValue
public int intValue()
- Specified by:
intValue
in class java.lang.Number
longValue
public long longValue()
- Specified by:
longValue
in class java.lang.Number
floatValue
public float floatValue()
- Specified by:
floatValue
in class java.lang.Number
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in class java.lang.Number