Package coneforest.psylla.core
Class PsyBigInteger
java.lang.Object
coneforest.psylla.core.PsyBigInteger
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyBitwise<PsyIntegral>
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyIntegral
,PsyLogical<PsyIntegral>
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyRational
,PsyRealNumeric
,PsyScalar<PsyRealNumeric>
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPsyBigInteger
(long integer) PsyBigInteger
(PsyInteger oInteger) PsyBigInteger
(String image) PsyBigInteger
(BigInteger value) -
Method Summary
Modifier and TypeMethodDescriptionint
cmp
(PsyRealNumeric oRealNumeric) double
boolean
int
hashCode()
int
intValue()
long
psyAbs()
Returns anumeric
absolute value of this object.psyAdd
(PsyRealNumeric oRealNumeric) psyAnd
(PsyIntegral oIntegral) Returns a result of logical conjunction of this object and given object.psyBitShift
(PsyInteger oShift) Returns abitwise
whose value is equivalent to this value with bits shifted at the given distance.psyClearBit
(PsyInteger oBit) Returns abitwise
whose value is equivalent to this value with the designated bit cleared.psyDiv
(PsyRealNumeric oRealNumeric) psyFlipBit
(PsyInteger oBit) Returns abitwise
whose value is equivalent to this value with the designated bit flipped.psyGCD
(PsyIntegral oIntegral) Returns anintegral
representing the greatest common divisor of this object and given object.psyIdiv
(PsyIntegral oIntegral) Returns aboolean
indicating whether this object represents a zero value.psyMod
(PsyIntegral oIntegral) psyMul
(PsyRealNumeric oRealNumeric) psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.psyNot()
Returns a result of logical negation of this object.psyOr
(PsyIntegral oIntegral) Returns a result of logical disjunction of this object and given object.psySetBit
(PsyInteger oBit) Returns abitwise
whose value is equivalent to this value with the designated bit set.Returns the signum of this object.psySub
(PsyRealNumeric oRealNumeric) psyTestBit
(PsyInteger oBit) Returns aboolean
indicating if the designated bit is set.psyXor
(PsyIntegral oIntegral) 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.PsyAdditive
psyNotZero
Methods inherited from interface coneforest.psylla.core.PsyIntegral
psyCeiling, psyDenominator, psyFloor, psyLCM, psyNumerator, psyRound, psyToIntegral
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyRealNumeric
imagValue, psyAcos, psyAdd, psyAsin, psyAtan, psyCbrt, psyCmp, psyCos, psyCosh, psyDiv, psyEq, psyExp, psyGe, psyGt, psyHypot, psyLe, psyLog, psyLt, psyMul, psyPow, psyPow, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
Constructor Details
-
PsyBigInteger
-
PsyBigInteger
public PsyBigInteger(long integer) -
PsyBigInteger
-
PsyBigInteger
-
-
Method Details
-
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
-
bigIntegerValue
- Specified by:
bigIntegerValue
in interfacePsyRational
-
psyBitShift
Description copied from interface:PsyBitwise
Returns abitwise
whose value is equivalent to this value with bits shifted at the given distance. If the distance is negative, the left shift is preformed. If the distance is positive, the right shift is preformed. If the distance is zero, returns this.- Specified by:
psyBitShift
in interfacePsyBitwise<PsyIntegral>
- Parameters:
oShift
- the shift distance.- Returns:
- a
bitwise
whose value is equivalent to this value with bits shifted at the given distance.
-
psyTestBit
Description copied from interface:PsyBitwise
Returns aboolean
indicating if the designated bit is set.- Specified by:
psyTestBit
in interfacePsyBitwise<PsyIntegral>
- Parameters:
oBit
- the index of bit to test.- Returns:
- a
boolean
indicating if the designated bit set.
-
psySetBit
Description copied from interface:PsyBitwise
Returns abitwise
whose value is equivalent to this value with the designated bit set.- Specified by:
psySetBit
in interfacePsyBitwise<PsyIntegral>
- Parameters:
oBit
- the index of bit to set.- Returns:
- a
bitwise
whose value is equivalent to this value with the designated bit set.
-
psyFlipBit
Description copied from interface:PsyBitwise
Returns abitwise
whose value is equivalent to this value with the designated bit flipped.- Specified by:
psyFlipBit
in interfacePsyBitwise<PsyIntegral>
- Parameters:
oBit
- the index of bit to flip.- Returns:
- a
bitwise
whose value is equivalent to this value with the designated bit flipped.
-
psyClearBit
Description copied from interface:PsyBitwise
Returns abitwise
whose value is equivalent to this value with the designated bit cleared.- Specified by:
psyClearBit
in interfacePsyBitwise<PsyIntegral>
- Parameters:
oBit
- the index of bit to clear.- Returns:
- a
bitwise
whose value is equivalent to this value with the designated bit cleared.
-
psyOr
Description copied from interface:PsyLogical
Returns a result of logical disjunction of this object and given object.- Specified by:
psyOr
in interfacePsyLogical<PsyIntegral>
- Parameters:
oIntegral
- given object.- Returns:
- a result.
-
psyAnd
Description copied from interface:PsyLogical
Returns a result of logical conjunction of this object and given object.- Specified by:
psyAnd
in interfacePsyLogical<PsyIntegral>
- Parameters:
oIntegral
- given object.- Returns:
- a result.
-
psyXor
Description copied from interface:PsyLogical
Returns a result of logical exclusive disjunction of this object and given object.- Specified by:
psyXor
in interfacePsyLogical<PsyIntegral>
- Parameters:
oIntegral
- given object.- Returns:
- a result.
-
psyNot
Description copied from interface:PsyLogical
Returns a result of logical negation of this object.- Specified by:
psyNot
in interfacePsyLogical<PsyIntegral>
- Returns:
- a result.
-
psyAbs
Description copied from interface:PsyNumeric
Returns anumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyIntegral
- Specified by:
psyAbs
in interfacePsyNumeric
- Specified by:
psyAbs
in interfacePsyRealNumeric
- Returns:
- a
numeric
absolute value.
-
psyIdiv
- Specified by:
psyIdiv
in interfacePsyIntegral
- Throws:
PsyUndefinedResultException
-
psyMod
public PsyIntegral psyMod(PsyIntegral oIntegral) throws PsyUndefinedResultException, PsyRangeCheckException - Specified by:
psyMod
in interfacePsyIntegral
- Throws:
PsyUndefinedResultException
PsyRangeCheckException
-
psyGCD
Description copied from interface:PsyIntegral
Returns anintegral
representing the greatest common divisor of this object and given object.- Specified by:
psyGCD
in interfacePsyIntegral
- Parameters:
oIntegral
- given object.- Returns:
- the greatest common divisor.
-
psyMul
- Specified by:
psyMul
in interfacePsyRealNumeric
-
psyDiv
- Specified by:
psyDiv
in interfacePsyRealNumeric
- Throws:
PsyUndefinedResultException
-
psyAdd
- Specified by:
psyAdd
in interfacePsyRealNumeric
-
psySub
- Specified by:
psySub
in interfacePsyRealNumeric
-
psyNeg
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Specified by:
psyNeg
in interfacePsyIntegral
- Specified by:
psyNeg
in interfacePsyRealNumeric
- Returns:
- a negation.
-
psyIsZero
Description copied from interface:PsyAdditive
Returns aboolean
indicating whether this object represents a zero value.- Specified by:
psyIsZero
in interfacePsyAdditive<PsyNumeric>
- Returns:
PsyBoolean.TRUE
if this object represents a zero value, andPsyBoolean.FALSE
otherwise.
-
psySignum
Description copied from interface:PsyNumeric
Returns the signum of this object.- Specified by:
psySignum
in interfacePsyNumeric
- Returns:
- the
numeric
signum of this object.
-
cmp
- Specified by:
cmp
in interfacePsyRational
- Specified by:
cmp
in interfacePsyRealNumeric
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
-
equals
-
hashCode
public int hashCode()
-