Package coneforest.psylla.core
Class PsyBigInteger
- java.lang.Object
-
- coneforest.psylla.core.PsyBigInteger
-
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyBitwise<PsyBigInteger>
,PsyConvertableToInteger
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyLogical<PsyBigInteger>
,PsyNumeric
,PsyObject
,PsyRealNumeric
,PsyScalar<PsyRealNumeric>
public class PsyBigInteger extends Object implements PsyBitwise<PsyBigInteger>, PsyRealNumeric
-
-
Constructor Summary
Constructors Constructor Description PsyBigInteger(long integer)
PsyBigInteger(PsyInteger oInteger)
PsyBigInteger(BigInteger value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue()
boolean
equals(Object object)
int
hashCode()
int
intValue()
long
longValue()
PsyBigInteger
psyAbs()
Returns a Ψ-numeric
absolute value of this object.PsyRealNumeric
psyAdd(PsyRealNumeric oNumeric)
PsyBigInteger
psyAnd(PsyBigInteger oBigInteger)
Returns a result of logical conjunction of this object and given object.PsyBigInteger
psyBitShift(PsyInteger oShift)
PsyBigInteger
psyCeiling()
PsyBigInteger
psyClearBit(PsyInteger oBit)
PsyInteger
psyCmp(PsyRealNumeric oNumeric)
Compares this object against given object and returns a Ψ-integer
indicating the result of the comparison.PsyBigInteger
psyFlipBit(PsyInteger oBit)
PsyBigInteger
psyFloor()
PsyBoolean
psyIsZero()
Returns a Ψ-boolean
indicating whether this object represents a zero value.PsyRealNumeric
psyMul(PsyRealNumeric oNumeric)
PsyBigInteger
psyNeg()
Returns a Ψ-additive
representing the result of arithmetic negation of this object.PsyBigInteger
psyNot()
Returns a result of logical negation of this object.PsyBigInteger
psyOr(PsyBigInteger oBigInteger)
Returns a result of logical disjunction of this object and given object.PsyBigInteger
psyRound()
PsyBigInteger
psySetBit(PsyInteger oBit)
PsyBigInteger
psySignum()
Returns the signum of this object.PsyRealNumeric
psySub(PsyRealNumeric oNumeric)
PsyBoolean
psyTestBit(PsyInteger oBit)
PsyBigInteger
psyXor(PsyBigInteger oBigInteger)
Returns a result of logical exclusive disjunction of this object and given object.-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface coneforest.psylla.core.PsyArithmetic
psyNotZero
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyRealNumeric
imagValue, psyAcos, psyAdd, psyAsin, psyAtan, psyCbrt, psyCos, psyCosh, psyDiv, psyDiv, psyEq, psyExp, psyGe, psyGt, psyHypot, psyLe, psyLog, psyLt, psyMul, psyPow, psyPow, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
-
-
-
Constructor Detail
-
PsyBigInteger
public PsyBigInteger(BigInteger value)
-
PsyBigInteger
public PsyBigInteger(long integer)
-
PsyBigInteger
public PsyBigInteger(PsyInteger oInteger)
-
-
Method Detail
-
intValue
public int intValue()
- Specified by:
intValue
in interfacePsyRealNumeric
-
longValue
public long longValue()
- Specified by:
longValue
in interfacePsyRealNumeric
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in interfacePsyRealNumeric
-
psyBitShift
public PsyBigInteger psyBitShift(PsyInteger oShift)
- Specified by:
psyBitShift
in interfacePsyBitwise<PsyBigInteger>
-
psyTestBit
public PsyBoolean psyTestBit(PsyInteger oBit)
- Specified by:
psyTestBit
in interfacePsyBitwise<PsyBigInteger>
-
psySetBit
public PsyBigInteger psySetBit(PsyInteger oBit)
- Specified by:
psySetBit
in interfacePsyBitwise<PsyBigInteger>
-
psyFlipBit
public PsyBigInteger psyFlipBit(PsyInteger oBit)
- Specified by:
psyFlipBit
in interfacePsyBitwise<PsyBigInteger>
-
psyClearBit
public PsyBigInteger psyClearBit(PsyInteger oBit)
- Specified by:
psyClearBit
in interfacePsyBitwise<PsyBigInteger>
-
psyOr
public PsyBigInteger psyOr(PsyBigInteger oBigInteger)
Description copied from interface:PsyLogical
Returns a result of logical disjunction of this object and given object.- Specified by:
psyOr
in interfacePsyLogical<PsyBigInteger>
- Parameters:
oBigInteger
- given object.- Returns:
- a result.
-
psyAnd
public PsyBigInteger psyAnd(PsyBigInteger oBigInteger)
Description copied from interface:PsyLogical
Returns a result of logical conjunction of this object and given object.- Specified by:
psyAnd
in interfacePsyLogical<PsyBigInteger>
- Parameters:
oBigInteger
- given object.- Returns:
- a result.
-
psyXor
public PsyBigInteger psyXor(PsyBigInteger oBigInteger)
Description copied from interface:PsyLogical
Returns a result of logical exclusive disjunction of this object and given object.- Specified by:
psyXor
in interfacePsyLogical<PsyBigInteger>
- Parameters:
oBigInteger
- given object.- Returns:
- a result.
-
psyNot
public PsyBigInteger psyNot()
Description copied from interface:PsyLogical
Returns a result of logical negation of this object.- Specified by:
psyNot
in interfacePsyLogical<PsyBigInteger>
- Returns:
- a result.
-
psyCeiling
public PsyBigInteger psyCeiling()
- Specified by:
psyCeiling
in interfacePsyRealNumeric
-
psyFloor
public PsyBigInteger psyFloor()
- Specified by:
psyFloor
in interfacePsyRealNumeric
-
psyRound
public PsyBigInteger psyRound()
- Specified by:
psyRound
in interfacePsyRealNumeric
-
psyAbs
public PsyBigInteger psyAbs()
Description copied from interface:PsyNumeric
Returns a Ψ-numeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Specified by:
psyAbs
in interfacePsyRealNumeric
- Returns:
- a Ψ-
numeric
absolute value.
-
psyMul
public PsyRealNumeric psyMul(PsyRealNumeric oNumeric)
- Specified by:
psyMul
in interfacePsyRealNumeric
-
psySub
public PsyRealNumeric psySub(PsyRealNumeric oNumeric)
- Specified by:
psySub
in interfacePsyRealNumeric
-
psyAdd
public PsyRealNumeric psyAdd(PsyRealNumeric oNumeric)
- Specified by:
psyAdd
in interfacePsyRealNumeric
-
psyNeg
public PsyBigInteger psyNeg()
Description copied from interface:PsyAdditive
Returns a Ψ-additive
representing the result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Specified by:
psyNeg
in interfacePsyRealNumeric
- Returns:
- a negation.
-
psyIsZero
public PsyBoolean psyIsZero()
Description copied from interface:PsyArithmetic
Returns a Ψ-boolean
indicating whether this object represents a zero value.- Specified by:
psyIsZero
in interfacePsyArithmetic<PsyNumeric>
- Returns:
PsyBoolean.TRUE
if this object represents a zero value, andPsyBoolean.FALSE
otherwise.
-
psySignum
public PsyBigInteger psySignum()
Description copied from interface:PsyRealNumeric
Returns the signum of this object.- Specified by:
psySignum
in interfacePsyRealNumeric
- Returns:
- the Ψ-
realnumeric
signum of this object.
-
psyCmp
public PsyInteger psyCmp(PsyRealNumeric oNumeric)
Description copied from interface:PsyScalar
Compares this object against given object and returns a Ψ-integer
indicating the result of the comparison. Returns negative value if this object is less than given one, zero if this object is equal to given one, and positive value if this object is greater than given one.- Specified by:
psyCmp
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oNumeric
- an object with which this object is compared.- Returns:
- a result of the comparison.
-
-