private static final class DiscreteDomain.BigIntegerDomain extends DiscreteDomain<java.math.BigInteger> implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static DiscreteDomain.BigIntegerDomain |
INSTANCE |
private static java.math.BigInteger |
MAX_LONG |
private static java.math.BigInteger |
MIN_LONG |
private static long |
serialVersionUID |
| Modifier | Constructor and Description |
|---|---|
private |
BigIntegerDomain() |
| Modifier and Type | Method and Description |
|---|---|
long |
distance(java.math.BigInteger start,
java.math.BigInteger end)
Returns a signed value indicating how many nested invocations of
DiscreteDomain.next(C) (if positive) or DiscreteDomain.previous(C) (if negative) are needed to reach
end starting from start. |
java.math.BigInteger |
next(java.math.BigInteger value)
Returns the unique least value of type
C that is greater than
value, or null if none exists. |
java.math.BigInteger |
previous(java.math.BigInteger value)
Returns the unique greatest value of type
C that is less than
value, or null if none exists. |
private java.lang.Object |
readResolve() |
java.lang.String |
toString() |
bigIntegers, integers, longs, maxValue, minValueprivate static final DiscreteDomain.BigIntegerDomain INSTANCE
private static final java.math.BigInteger MIN_LONG
private static final java.math.BigInteger MAX_LONG
private static final long serialVersionUID
public java.math.BigInteger next(java.math.BigInteger value)
DiscreteDomainC that is greater than
value, or null if none exists. Inverse operation to DiscreteDomain.previous(C).next in class DiscreteDomain<java.math.BigInteger>value - any value of type Cvalue, or null if
value is maxValue()public java.math.BigInteger previous(java.math.BigInteger value)
DiscreteDomainC that is less than
value, or null if none exists. Inverse operation to DiscreteDomain.next(C).previous in class DiscreteDomain<java.math.BigInteger>value - any value of type Cvalue, or null if
value is minValue()public long distance(java.math.BigInteger start,
java.math.BigInteger end)
DiscreteDomainDiscreteDomain.next(C) (if positive) or DiscreteDomain.previous(C) (if negative) are needed to reach
end starting from start. For example, if end =
next(next(next(start))), then distance(start, end) == 3 and distance(end, start) == -3. As well, distance(a, a) is always
zero.
Note that this function is necessarily well-defined for any discrete type.
distance in class DiscreteDomain<java.math.BigInteger>Long.MIN_VALUE or
Long.MAX_VALUE if the distance is too small or too large,
respectively.private java.lang.Object readResolve()
public java.lang.String toString()
toString in class java.lang.Object