public class RandomPrimitive extends AbstractNumericPrimitive<RandomPrimitive>
Random
number generator, producing next numbers in sequence
upon demand. Setters (e.g., setScalar(int)
update the random number
generator's seed value, while all other mutators "sink" (no operation)Modifier and Type | Field and Description |
---|---|
static RandomPrimitive |
INSTANCE |
NaN, ONEI, ZERO_DOUBLE_LONG_BITS, ZERO_FLOAT_INT_BITS, ZEROI
Constructor and Description |
---|
RandomPrimitive() |
RandomPrimitive(long aSeed) |
RandomPrimitive(Random aRandom) |
Modifier and Type | Method and Description |
---|---|
RandomPrimitive |
absoluteValue()
Replace the current value with the absolute value of itself
|
boolean |
booleanPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
boolean |
booleanPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
boolean |
booleanValue() |
byte |
bytePostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
byte |
bytePostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
byte |
byteValue() |
char |
charPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
char |
charPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
char |
charValue() |
RandomPrimitive |
copy()
Produce a replica of this object
|
RandomPrimitive |
copyUsing(BigDecimal aValue)
Using this real as a factory, produce a new real of the
same type but initialized with the value specified
|
RandomPrimitive |
copyUsing(BigInteger aValue)
Using this real as a factory, produce a new real of the
same type but initialized with the value specified
|
RandomPrimitive |
copyUsing(boolean aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(byte aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(char aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(double aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(float aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(int aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(long aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsing(short aValue)
Using this object as a factory, produce a new scalar of an
appropriately matching type but initialized with the value specified
|
RandomPrimitive |
copyUsingPrimitive(SealedPrimitive<?> aValue)
Using this primitive as a factory, produce a new primitive of the same
type but initialized with the value specified
|
RandomPrimitive |
copyUsingReal(SealedReal<?> aValue)
Using this real as a factory, produce a new real of the
same type but initialized with the value specified
|
RandomPrimitive |
copyUsingScalar(SealedScalar<?> aValue)
Using this scalar as a factory, produce a new scalar of the
same type but initialized with the value specified
|
RandomPrimitive |
copyUsingText(CharSequence aValue)
Using this primitive as a factory, produce a new primitive of the same
type but initialized with the value specified
|
RandomPrimitive |
cube()
Replace the current value with the cube of itself
|
RandomPrimitive |
decrement()
Replace the current value with the current value minus unity (one)
|
double |
doublePostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
double |
doublePostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
float |
floatPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
float |
floatValue() |
ConcurrencyStrategy |
getConcurrency() |
StructureStrategy |
getStructureStrategy() |
int |
hashCode() |
RandomPrimitive |
increment()
Replace the current value with the current value plus unity (one)
|
<P extends Primitive<?>> |
inducePostDecrement(P aTarget)
Decrement the value of this Primitive then induce its original value into
the specified target
|
<R extends Real<?>> |
inducePostDecrement(R aTarget)
Decrement the value of this real then induce its original value into
the specified target
|
<S extends Scalar<?>> |
inducePostDecrement(S aTarget)
Decrement the value of this scalar then induce its original value into
the specified target
|
<P extends Primitive<?>> |
inducePostIncrement(P aTarget)
Increment the value of this Primitive then induce its original value into
the specified target
|
<R extends Real<?>> |
inducePostIncrement(R aTarget)
Increment the value of this real then induce its original value into
the specified target
|
<S extends Scalar<?>> |
inducePostIncrement(S aTarget)
Increment the value of this scalar then induce its original value into
the specified target
|
<P extends Primitive<?>> |
inducePrimitiveValue(P aTarget)
Induce the current value of this Primitive into the specified target
|
<R extends Real<?>> |
induceRealMaximum(R aTarget)
Induce the maximum domain value into the target
|
<R extends Real<?>> |
induceRealMinimum(R aTarget)
Induce the minimum domain value into the target
|
<R extends Real<?>> |
induceRealValue(R aTarget)
Induce the current value of this real into the specified target
|
<S extends Scalar<?>> |
induceScalarMaximum(S aTarget)
Induce the maximum domain value into the target
|
<S extends Scalar<?>> |
induceScalarMinimum(S aTarget)
Induce the minimum domain value into the target
|
<S extends Scalar<?>> |
induceScalarValue(S aTarget)
Induce the current value of this scalar into the specified target
|
int |
intPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
int |
intPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
int |
intValue() |
RandomPrimitive |
invalidate()
Replace the current value an invalid value such
INVALID if possible, otherwise replace it with zero |
RandomPrimitive |
inverse()
Replace the current value its multiplicative inverse (
1/x ) |
boolean |
isConfigurable()
|
boolean |
isEmpty()
Answer
true if this structure contains no elements. |
boolean |
isFinite() |
boolean |
isInfinity() |
boolean |
isInvalid() |
boolean |
isMaximum() |
boolean |
isMinimum() |
boolean |
isModulo()
Answer
true if this value represents the magnitude of a vector
into a modulo set, or finite ring. |
boolean |
isNegative() |
boolean |
isNegativeFinite() |
boolean |
isNegativeInfinity() |
boolean |
isPositive() |
boolean |
isPositiveInfinity() |
boolean |
isReal()
Answer
true if this value represents the magnitude of a vector
into the set of real numbers. |
boolean |
isUnity()
Answer
true if this value represents the multiplicative
identity in its arithmetic domain. |
boolean |
isZero()
Answer
true if this value represents the additive identity
in its algebraic group. |
long |
longPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
long |
longPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
long |
longValue() |
RandomPrimitive |
negate()
Replace the current value with the additive inverse (sign negation) of
itself, that is transform it into a number that when added to the
original yields zero.
|
double |
nextGaussian() |
RandomPrimitive |
not()
Replace the current integral binary vector with its one's
complement.
|
RandomPrimitive |
random()
Replace the current value with an evenly-distributed
random value between zero (inclusive) and unity
(exclusive for floating point, inclusive for integrals) |
RandomPrimitive |
round(RoundingStrategy aRoundingStrategy)
Round the current value using the specified rounding
strategy |
RandomPrimitive |
setMaximum()
Replace the current value with maximum value available for the
implementation's numeric
precision . |
RandomPrimitive |
setMinimum()
Replace the current value with minimum value available for the
implementation's numeric
precision . |
RandomPrimitive |
setReal(BigDecimal aValue)
Set this property to the specified unlimited
decimal
value and answer this object (facilitates chaining) |
RandomPrimitive |
setReal(BigInteger aValue)
Set this property to the specified unlimited
integer
value and answer this object (facilitates chaining) |
RandomPrimitive |
setScalar(boolean aValue)
Set this property to the specified
boolean value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(byte aValue)
Set this property to the specified
byte value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(char aValue)
Set this property to the specified
char value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(double aValue)
Set this property to the specified
double value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(float aValue)
Set this property to the specified
float value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(int aValue)
Set this property to the specified
int value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(long aValue)
Set this property to the specified
long value and answer this
object (facilitates chaining) |
RandomPrimitive |
setScalar(short aValue)
Set this property to the specified
short value and answer this
object (facilitates chaining) |
RandomPrimitive |
shiftLeft(int count)
Attempt to shift the elements of this tuple to the "left" the specified
number of ordinal positions.
|
RandomPrimitive |
shiftRight(int count)
Attempt to shift the elements of this tuple to the "right" the specified
number of ordinal positions.
|
short |
shortPostDecrement()
Decrement the scalar value of this object then return the original value
prior to decrementing
|
short |
shortPostIncrement()
Increment the scalar value of this object then return the original value
prior to incrementing
|
short |
shortValue() |
int |
signum() |
RandomPrimitive |
square()
Replace the current value with the square of itself
|
RandomPrimitive |
swapPrimitives(Primitive<?> aPrimitive)
Swap the value of this primitive for the specified one and set the
specified primitive's value to the current value of this primitive
|
String |
textPostDecrement()
Decrement the real value of this text then return the original text prior
to decrementing
|
String |
textPostIncrement()
Increment the real value of this text then return the original text prior
to incrementing
|
Number |
toNumber() |
String |
toString() |
BigDecimal |
toUnlimitedDecimal() |
BigInteger |
toUnlimitedInteger() |
BigDecimal |
unlimitedDecimalPostDecrement()
Decrement the real value of this object then return the original value
prior to decrementing
|
BigDecimal |
unlimitedDecimalPostIncrement()
Increment the real value of this object then return the original value
prior to incrementing
|
BigInteger |
unlimitedIntegerPostDecrement()
Decrement the real value of this object then return the original value
prior to decrementing
|
BigInteger |
unlimitedIntegerPostIncrement()
Increment the real value of this object then return the original value
prior to incrementing
|
append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendCodePoint, charAt, clear, clearContents, clearText, codePointAt, codePointBefore, codePointCount, compareTo, compareToPrimitive, delete, deleteCharAt, indexOfText, indexOfText, induceTextValue, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, isEqualToPrimitive, isEqualToText, isGreaterOrEqualToPrimitive, isGreaterOrEqualToText, isGreaterThanPrimitive, isGreaterThanText, isLessOrEqualToPrimitive, isLessOrEqualToText, isLessThanPrimitive, isLessThanText, isNotEqualToPrimitive, isNotEqualToText, isText, length, lowerCase, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, replace, replace, replaceAll, replaceCharacter, replaceFirst, reverse, setBoolean, setCharacter, setCharAt, setLength, setNumber, setPrimitive, setReal, setText, subSequence, substring, substring, titleCase, toPrimitive, toPrimitive, trim, upperCase
andOfPrimitive, angleWithPrimitive, compareToText, differenceOfPrimitive, hypotenuseWithPrimitive, inducePrimitiveMaximum, inducePrimitiveMinimum, induceTextSize, modOfPrimitive, orOfPrimitive, powerOfPrimitive, productOfPrimitive, quotientOfPrimitive, sumOfPrimitive, toPrimitive, xorOfPrimitive
and, andOfNumber, andOfReal, angleWithReal, compareToNumber, compareToReal, compareToReal, compareToReal, difference, difference, differenceOfNumber, differenceOfReal, gcd, gcdOfNumber, gcdOfReal, hypotenuseWithReal, induceRealSize, isEqual, isEqual, isEqualToNumber, isEqualToReal, isGreater, isGreater, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqualToNumber, isGreaterOrEqualToReal, isGreaterThanNumber, isGreaterThanReal, isLess, isLess, isLessOrEqual, isLessOrEqual, isLessOrEqualToNumber, isLessOrEqualToReal, isLessThanNumber, isLessThanReal, isNotEqual, isNotEqual, isNotEqualToNumber, isNotEqualToReal, mod, mod, modOfNumber, modOfReal, or, orOfNumber, orOfReal, powerOfReal, product, product, productOfNumber, productOfReal, quotient, quotient, quotientOfNumber, quotientOfReal, sum, sum, sumOfNumber, sumOfReal, toReal, unlimitedIntegerModularInverse, xor, xorOfNumber, xorOfReal
and, and, and, and, and, and, andOfScalar, angleWith, angleWithNumber, angleWithScalar, arcCosine, arcSine, arcTangent, assertDomain, assertPrecision, base10Log, boundsCheck, byteMaskAt, byteNotMaskAt, byteValue, ceiling, charMaskAt, charNotMaskAt, charValue, clearByteBitAt, clearCharBitAt, clearDoubleBitAt, clearFloatBitAt, clearIntBitAt, clearLongBitAt, clearShortBitAt, clearUnlimitedDecimalBitAt, clearUnlimitedIntegerBitAt, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareTo, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToZero, cosine, cubeRoot, degrees, difference, difference, difference, difference, difference, difference, difference, difference, differenceOfScalar, divideByZero, down, exponential, exponentialLessOne, floor, gcd, gcd, gcd, gcd, gcd, gcdOfScalar, getBooleanBitAt, getByteBitAt, getCharBitAt, getDomain, getDoubleBitAt, getFloatBitAt, getIntBitAt, getLongBitAt, getPrecision, getShortBitAt, getUnlimitedDecimalBitAt, getUnlimitedIntegerBitAt, halfDown, halfEven, halfUp, hashCode, hashCode, hashCode, hashCode, hashCode, hashCode, hashCode, hashCode, hyperbolicCosine, hyperbolicSine, hyperbolicTangent, hypotenuseWith, hypotenuseWithNumber, hypotenuseWithScalar, indexOutOfBoundsAt, induceScalarSize, intGCD, intMaskAt, intModularInverse, intModularQuotient, intNotMaskAt, intValue, isAlphabetic, isBmpCodePoint, isCountable, isDigit, isElastic, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqualToScalar, isExpandable, isFalse, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqualToScalar, isGreaterThanScalar, isHighSurrogate, isIdentifierIgnorable, isIdeographic, isImaginary, isISOControl, isJavaIdentifierPart, isJavaIdentifierStart, isLess, isLess, isLess, isLess, isLess, isLess, isLess, isLess, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqualToScalar, isLessThanScalar, isLetter, isLetterOrDigit, isLowerCase, isLowSurrogate, isMirrored, isMutable, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqualToScalar, isOrdered, isPositiveFinite, isReducible, isSupplementaryCodePoint, isSurrogate, isTitleCase, isTrue, isUnicode, isUnicodeIdentifierPart, isUnicodeIdentifierStart, isUnique, isUpperCase, isValid, isValidCodePoint, isWhitespace, longGCD, longMaskAt, longModularInverse, longModularQuotient, longNotMaskAt, longSize, longValue, milliseconds, mod, mod, mod, mod, mod, mod, mod, mod, modOfScalar, nanoseconds, naturalLog, naturalLogPlusOne, or, or, or, or, or, or, orOfScalar, power, power, powerOfNumber, powerOfScalar, product, product, product, product, product, product, product, product, productOfScalar, promoteTo, quotient, quotient, quotient, quotient, quotient, quotient, quotient, quotient, quotientOfScalar, radians, setByteBitAt, setCharBitAt, setDoubleBitAt, setE, setEnumeration, setFalse, setFloatBitAt, setIntBitAt, setLongBitAt, setNegativeInfinity, setPi, setPositiveInfinity, setScalar, setShortBitAt, setTrue, setUnity, setUnlimitedDecimalBitAt, setUnlimitedIntegerBitAt, setZero, shiftRightExtendZero, shortMaskAt, shortNotMaskAt, shortValue, sine, size, squareRoot, sum, sum, sum, sum, sum, sum, sum, sum, sumOfScalar, tangent, toBoolean, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toBooleanArray, toByteArray, toCharacter, toCodePoint, toEnumeration, toScalar, toUnlimitedInteger, unlimitedIntegerMaskAt, unlimitedIntegerNotMaskAt, up, xor, xor, xor, xor, xor, xor, xorOfScalar
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareToReal, compareToReal, compareToReal, isEqual, isEqual, isEqualToReal, isGreater, isGreater, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqualToReal, isGreaterThanReal, isLess, isLess, isLessOrEqual, isLessOrEqual, isLessOrEqualToReal, isLessThanReal, isNotEqual, isNotEqual, isNotEqualToReal
compareToNumber, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToScalar, compareToZero, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqual, isEqualToNumber, isEqualToScalar, isFalse, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreater, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqual, isGreaterOrEqualToNumber, isGreaterOrEqualToScalar, isGreaterThanNumber, isGreaterThanScalar, isLess, isLess, isLess, isLess, isLess, isLess, isLess, isLess, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqual, isLessOrEqualToNumber, isLessOrEqualToScalar, isLessThanNumber, isLessThanScalar, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqual, isNotEqualToNumber, isNotEqualToScalar, isTrue, toBoolean, toCharacter, toCodePoint, toEnumeration
isImaginary, isPositiveFinite, isValid
isAlphabetic, isBmpCodePoint, isDigit, isHighSurrogate, isIdentifierIgnorable, isIdeographic, isISOControl, isJavaIdentifierPart, isJavaIdentifierStart, isLetter, isLetterOrDigit, isLowerCase, isLowSurrogate, isMirrored, isSupplementaryCodePoint, isSurrogate, isTitleCase, isUnicode, isUnicodeIdentifierPart, isUnicodeIdentifierStart, isUpperCase, isValidCodePoint, isWhitespace
getPrecision
induceRealSize
induceScalarSize
getDomain, longSize, size
isCountable, isElastic, isExpandable, isOrdered, isReducible, isUnique
toReal
toScalar
and, andOfReal, angleWithReal, difference, difference, differenceOfReal, gcd, gcdOfReal, hypotenuseWithReal, mod, mod, modOfReal, or, orOfReal, powerOfReal, product, product, productOfReal, quotient, quotient, quotientOfReal, sum, sum, sumOfReal, xor, xorOfReal
and, and, and, and, and, and, andOfNumber, andOfScalar, angleWith, angleWithNumber, angleWithScalar, arcCosine, arcSine, arcTangent, base10Log, ceiling, cosine, cubeRoot, degrees, difference, difference, difference, difference, difference, difference, difference, difference, differenceOfNumber, differenceOfScalar, down, exponential, exponentialLessOne, floor, gcd, gcd, gcd, gcd, gcd, gcdOfNumber, gcdOfScalar, halfDown, halfEven, halfUp, hyperbolicCosine, hyperbolicSine, hyperbolicTangent, hypotenuseWith, hypotenuseWithNumber, hypotenuseWithScalar, milliseconds, mod, mod, mod, mod, mod, mod, mod, mod, modOfNumber, modOfScalar, nanoseconds, naturalLog, naturalLogPlusOne, or, or, or, or, or, or, orOfNumber, orOfScalar, power, power, powerOfNumber, powerOfScalar, product, product, product, product, product, product, product, product, productOfNumber, productOfScalar, quotient, quotient, quotient, quotient, quotient, quotient, quotient, quotient, quotientOfNumber, quotientOfScalar, radians, setE, setEnumeration, setNegativeInfinity, setPi, setPositiveInfinity, setScalar, setUnity, setZero, shiftRightExtendZero, sine, squareRoot, sum, sum, sum, sum, sum, sum, sum, sum, sumOfNumber, sumOfScalar, tangent, up, xor, xor, xor, xor, xor, xor, xorOfNumber, xorOfScalar
setFalse, setTrue
assertPrecision, promoteTo
assertDomain
public static final RandomPrimitive INSTANCE
public RandomPrimitive()
public RandomPrimitive(long aSeed)
public RandomPrimitive(Random aRandom)
public final RandomPrimitive absoluteValue() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
absoluteValue
in interface MutableScalar<RandomPrimitive>
absoluteValue
in class AbstractScalar<RandomPrimitive>
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final boolean booleanPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableBooleanValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final boolean booleanPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableBooleanValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic boolean booleanValue()
boolean
public final byte bytePostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableByteValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final byte bytePostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableByteValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic byte byteValue()
byteValue
in interface SealedByteValue
byteValue
in class Number
byte
public final char charPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableCharacterValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final char charPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableCharacterValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic char charValue()
char
public final RandomPrimitive copy()
Replicator
public final RandomPrimitive copyUsing(BigDecimal aValue)
RealReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(BigInteger aValue)
RealReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(boolean aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(byte aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(char aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(double aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(float aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(int aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(long aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsing(short aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsingPrimitive(SealedPrimitive<?> aValue)
PrimitiveReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsingReal(SealedReal<?> aValue)
RealReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsingScalar(SealedScalar<?> aValue)
ScalarReplicator
aValue
- a new valuepublic final RandomPrimitive copyUsingText(CharSequence aValue)
PrimitiveReplicator
copyUsingText
in interface PrimitiveReplicator<RandomPrimitive>
copyUsingText
in interface TextReplicator<RandomPrimitive>
copyUsingText
in class AbstractNumericPrimitive<RandomPrimitive>
aValue
- a new valuepublic final RandomPrimitive cube() throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
UnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the new value was incommensurate with this object's
specificationArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive decrement() throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
UnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the new value was incommensurate with this object's
specificationArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectpublic final double doublePostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableDoubleValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final double doublePostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableDoubleValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic double doubleValue()
doubleValue
in interface SealedDoubleValue
doubleValue
in class Number
double
public final boolean equals(Object obj)
equals
in interface SealedKernel
equals
in class AbstractNumericPrimitive<RandomPrimitive>
public final float floatPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableFloatValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final float floatPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableFloatValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic float floatValue()
floatValue
in interface SealedFloatValue
floatValue
in class Number
float
public final ConcurrencyStrategy getConcurrency()
public final StructureStrategy getStructureStrategy()
getStructureStrategy
in interface SealedAlgebraicStructure
getStructureStrategy
in class AbstractNumericPrimitive<RandomPrimitive>
public final int hashCode()
hashCode
in interface SealedKernel
hashCode
in class Object
public final RandomPrimitive increment() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final <P extends Primitive<?>> P inducePostDecrement(P aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
PrimitiveInductor
inducePostDecrement
in interface PrimitiveInductor<RandomPrimitive>
inducePostDecrement
in class AbstractNumericPrimitive<RandomPrimitive>
P
- the target typeaTarget
- a target into which the current value of this Primitive will be
induced, prior to decrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target Primitive cannot be changedIllegalStateException
- this target Primitive cannot be changed at this timepublic final <R extends Real<?>> R inducePostDecrement(R aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
RealInductor
inducePostDecrement
in interface RealInductor<RandomPrimitive>
inducePostDecrement
in class AbstractNumericPrimitive<RandomPrimitive>
R
- the target typeaTarget
- a target into which the current value of this real will be
induced, prior to decrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <S extends Scalar<?>> S inducePostDecrement(S aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
ScalarInductor
S
- the target typeaTarget
- a target into which the current value of this scalar will be
induced, prior to decrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <P extends Primitive<?>> P inducePostIncrement(P aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
PrimitiveInductor
inducePostIncrement
in interface PrimitiveInductor<RandomPrimitive>
inducePostIncrement
in class AbstractNumericPrimitive<RandomPrimitive>
P
- the target typeaTarget
- a target into which the current value of this Primitive will be
induced, prior to incrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target Primitive cannot be changedIllegalStateException
- this target Primitive cannot be changed at this timepublic final <R extends Real<?>> R inducePostIncrement(R aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
RealInductor
inducePostIncrement
in interface RealInductor<RandomPrimitive>
inducePostIncrement
in class AbstractNumericPrimitive<RandomPrimitive>
R
- the target typeaTarget
- a target into which the current value of this real will be
induced, prior to incrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <S extends Scalar<?>> S inducePostIncrement(S aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
ScalarInductor
S
- the target typeaTarget
- a target into which the current value of this scalar will be
induced, prior to incrementingNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <P extends Primitive<?>> P inducePrimitiveValue(P aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
PrimitiveInductor
inducePrimitiveValue
in interface PrimitiveInductor<RandomPrimitive>
inducePrimitiveValue
in class AbstractNumericPrimitive<RandomPrimitive>
P
- the target typeaTarget
- a target into which the current value of this Primitive will be
inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target Primitive cannot be changedIllegalStateException
- this target Primitive cannot be changed at this timepublic final <R extends Real<?>> R induceRealMaximum(R aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
SealedRealDomain
R
- the target typeaTarget
- a target into which this domain's maximum value will be inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <R extends Real<?>> R induceRealMinimum(R aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
SealedRealDomain
R
- the target typeaTarget
- a target into which this domain's minimum value will be inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <R extends Real<?>> R induceRealValue(R aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
RealInductor
R
- the target typeaTarget
- a target into which the current value of this real will be
inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <S extends Scalar<?>> S induceScalarMaximum(S aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
SealedScalarDomain
S
- the target typeaTarget
- a target into which this domain's maximum value will be inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <S extends Scalar<?>> S induceScalarMinimum(S aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
SealedScalarDomain
S
- the target typeaTarget
- a target into which this domain's minimum value will be inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final <S extends Scalar<?>> S induceScalarValue(S aTarget) throws NullPointerException, NoSuchElementException, UnsupportedOperationException, IllegalStateException
ScalarInductor
S
- the target typeaTarget
- a target into which the current value of this scalar will be
inducedNullPointerException
- a null
value was provided when none was expectedNoSuchElementException
- an expected parameter was not found in the parameter sourceUnsupportedOperationException
- this target primitive cannot be changedIllegalStateException
- this target primitive cannot be changed at this timepublic final int intPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableIntegerValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final int intPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableIntegerValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic int intValue()
intValue
in interface SealedIntegerValue
intValue
in class Number
int
public final RandomPrimitive invalidate() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
INVALID
if possible, otherwise replace it with zeroinvalidate
in interface MutableScalar<RandomPrimitive>
invalidate
in class AbstractScalar<RandomPrimitive>
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final RandomPrimitive inverse() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
1/x
)UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final boolean isConfigurable()
StructureProperties
true
if the implementation of this object can be changed.expanded
, or reduced
, or has replaceable
components. Configurable structures are necessarily
mutable
; in fact, "configurability" can be
used as a strict definition of mutability. This predicate however
overrides #isMutable
in the respect that, for some types of
objects such as Variants
, mutability can be changed by
switching from a non-mutable implementation to a mutable one (e.g., via
assertPrecision
).isConfigurable
in interface StructureProperties
isConfigurable
in class AbstractScalar<RandomPrimitive>
true
if the implementation of this object can be changedpublic final boolean isEmpty()
StructureProperties
true
if this structure contains no elements. For
strings
this would indicate an empty string (no characters
in an empty array). For scalars this would indicate an empty set, or a
zero bit count, which would be the case of null
values. Note
that, although the null
constant technically contains zero
elements, its string
value evaluates to "null", which from
a String perspective is not empty.isEmpty
in interface StructureProperties
isEmpty
in interface TextProperties
isEmpty
in class AbstractNumericPrimitive<RandomPrimitive>
true
if this structure contains no elementspublic final boolean isFinite()
isFinite
in interface NumericProperties
isFinite
in class AbstractScalar<RandomPrimitive>
true
if this value represents a valid and finite valuepublic final boolean isInfinity()
public final boolean isInvalid()
public final boolean isMaximum()
true
if this value represents the maximum rational value
in the totally ordered set it representspublic final boolean isMinimum()
true
if this value represents the minimum rational value
in the totally ordered set it representspublic final boolean isModulo()
NumericProperties
true
if this value represents the magnitude of a vector
into a modulo set, or finite ring. This is not the same as testing
whether this object's implementation resembles the specification for the
MODULO
domain, since that is too specific to
implementation machinery. Modulo values, for instance can either be
real
or imaginary
.true
if this value represents the magnitude of a vector
into a modulo set, or finite ringpublic final boolean isNegative()
true
if this value represents a negative valuepublic final boolean isNegativeFinite()
isNegativeFinite
in interface NumericProperties
isNegativeFinite
in class AbstractScalar<RandomPrimitive>
true
if this value represents a valid, finite and
negative valuepublic final boolean isNegativeInfinity()
true
if this value represents negative
infinitypublic final boolean isPositive()
true
if this value represents a positive valuepublic final boolean isPositiveInfinity()
true
if this value represents positive
infinitypublic final boolean isReal()
NumericProperties
true
if this value represents the magnitude of a vector
into the set of real numbers. This is not the same as testing whether
this object's implementation resembles the specification for the
REAL
domain, since that is too specific to
implementation machinery. This more general test also includes real
modulo
values in its specification.true
if this value represents the magnitude of a vector
into the set of real numberspublic final boolean isUnity()
NumericProperties
true
if this value represents the multiplicative
identity in its arithmetic domain. For real numbers this is 1, for
matrices it would be the identity matrix and for functions this
would be a pass-through.true
if this value represents the multiplicative
identity in its domainpublic final boolean isZero()
NumericProperties
true
if this value represents the additive identity
in its algebraic group. For real numbers this is 0, for matrices this
would be the zero matrix and for functions this would map every
parameter to zero.true
if this value represents the additive
identity in its algebraic grouppublic final long longPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableLongValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final long longPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableLongValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic long longValue()
longValue
in interface SealedLongValue
longValue
in class Number
long
public final RandomPrimitive negate() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
boolean
and char
values do not exist, these
implementations will simply fail silently.)UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this object (optional)IllegalArgumentException
- if the new value was incommensurate with this object's
specification (optional)public final double nextGaussian()
public final RandomPrimitive not() throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
double
, will be first
converted to unlimited integers
before their bits are
reversed.UnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the new value was incommensurate with this object's
specificationArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive random() throws UnsupportedOperationException
MutableScalar
random
value between zero (inclusive) and unity
(exclusive for floating point, inclusive for integrals)random
in interface MutableScalar<RandomPrimitive>
random
in class AbstractScalar<RandomPrimitive>
UnsupportedOperationException
- if this object's value cannot be changedpublic final RandomPrimitive round(RoundingStrategy aRoundingStrategy) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException, NullPointerException
MutableScalar
strategy
UnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the new value was incommensurate with this object's
specificationArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectNullPointerException
public final RandomPrimitive setMaximum() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
precision
. Unlimited
values will be replaced with the maximum value available for the most
precise system scalar appropriate for the implementation, that is
unlimited integer
primitives will set
themselves to the maximum
long
value and
unlimited decimal
primitives will set
themselves to the maximum
double
value.UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final RandomPrimitive setMinimum() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableScalar
precision
. Unlimited
values will be replaced with the minimum value available for the most
precise system scalar appropriate for the implementation, that is
unlimited integer
primitives will set
themselves to the minimum
long
value and
unlimited decimal
primitives will set
themselves to the minimum
double
value.UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final RandomPrimitive setReal(BigDecimal aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException, NullPointerException
MutableUnlimitedDecimalValue
decimal
value and answer this object (facilitates chaining)aValue
- an unlimited decimal
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectNullPointerException
- a null
value was provided though this object does not
accept null
valuespublic final RandomPrimitive setReal(BigInteger aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException, NullPointerException
MutableUnlimitedIntegerValue
integer
value and answer this object (facilitates chaining)aValue
- an unlimited integer
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectNullPointerException
- a null
value was provided though this object does not
accept null
valuespublic final RandomPrimitive setScalar(boolean aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableBooleanValue
boolean
value and answer this
object (facilitates chaining)aValue
- a boolean
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(byte aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableByteValue
byte
value and answer this
object (facilitates chaining)aValue
- a byte
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(char aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableCharacterValue
char
value and answer this
object (facilitates chaining)aValue
- a char
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(double aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableDoubleValue
double
value and answer this
object (facilitates chaining)aValue
- a double
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(float aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableFloatValue
float
value and answer this
object (facilitates chaining)aValue
- a float
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(int aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableIntegerValue
int
value and answer this
object (facilitates chaining)aValue
- an int
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(long aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableLongValue
long
value and answer this
object (facilitates chaining)aValue
- a long
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive setScalar(short aValue) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableShortValue
short
value and answer this
object (facilitates chaining)aValue
- a short
valueUnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the specified value was incommensurate with this object's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive shiftLeft(int count) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
<<
). In other
sequences, the specified number of default values will be prepended to
the beginning of the sequence, increasing the ordinal position of all
existing elements by the specified count.count
- the number of default values to be prepended to this sequenceUnsupportedOperationException
- if this object's value cannot be changed or if this structure is
not an algebraic tupleIllegalArgumentException
- if the specified value was incommensurate with this structure's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this structurepublic final RandomPrimitive shiftRight(int count) throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
>>
operator). In other sequences, the specified number of values
will be removed from the beginning of the sequence, decreasing the
ordinal position of all remaining elements by the specified count.count
- the number of values to be removed from the beginning of this
sequenceUnsupportedOperationException
- if this object's value cannot be changed or if this structure is
not an algebraic tupleIllegalArgumentException
- if the specified value was incommensurate with this structure's
specificationArithmeticException
- the numeric value provided was incompatible with with algebraic
interpretation of this structurepublic final short shortPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableShortValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final short shortPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableShortValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic short shortValue()
shortValue
in interface SealedShortValue
shortValue
in class Number
short
public final int signum()
signum
in interface NumericProperties
signum
in class AbstractScalar<RandomPrimitive>
zero
, -1 if this number
is negative
or +1 if it is
positive
public final RandomPrimitive square() throws UnsupportedOperationException, IllegalArgumentException, ArithmeticException
MutableScalar
UnsupportedOperationException
- if this object's value cannot be changedIllegalArgumentException
- if the new value was incommensurate with this object's
specificationArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectpublic final RandomPrimitive swapPrimitives(Primitive<?> aPrimitive)
Primitive
aPrimitive
- the primitive to swap withpublic final String textPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableTextValue
textPostDecrement
in interface MutableTextValue<RandomPrimitive>
textPostDecrement
in class AbstractNumericPrimitive<RandomPrimitive>
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final String textPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableTextValue
textPostIncrement
in interface MutableTextValue<RandomPrimitive>
textPostIncrement
in class AbstractNumericPrimitive<RandomPrimitive>
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final Number toNumber()
Number
objectpublic final String toString()
toString
in interface CharSequence
toString
in interface SealedKernel
toString
in class Object
public final BigDecimal toUnlimitedDecimal()
decimal
property valuepublic final BigInteger toUnlimitedInteger()
integer
property valuepublic final BigDecimal unlimitedDecimalPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableUnlimitedDecimalValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final BigDecimal unlimitedDecimalPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableUnlimitedDecimalValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final BigInteger unlimitedIntegerPostDecrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableUnlimitedIntegerValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationpublic final BigInteger unlimitedIntegerPostIncrement() throws UnsupportedOperationException, ArithmeticException, IllegalArgumentException
MutableUnlimitedIntegerValue
UnsupportedOperationException
- if this object's value cannot be changedArithmeticException
- the new numeric value was incompatible with with algebraic
interpretation of this objectIllegalArgumentException
- if the new value was incommensurate with this object's
specificationCopyright © 2006-2012 Ware-Squared Software Development. All Rights Reserved.