- java.lang.Object
-
- swim.structure.Item
-
- swim.structure.Value
-
- swim.structure.Num
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Num
abs()
abstract Value
bitwiseAnd(Num that)
Value
bitwiseAnd(Value that)
abstract Value
bitwiseNot()
abstract Value
bitwiseOr(Num that)
Value
bitwiseOr(Value that)
abstract Value
bitwiseXor(Num that)
Value
bitwiseXor(Value that)
abstract boolean
booleanValue()
Converts thisValue
into a primitiveboolean
value.boolean
booleanValue(boolean orElse)
abstract byte
byteValue()
Converts thisNum
into a primitivebyte
value.byte
byteValue(byte orElse)
abstract Num
ceil()
abstract char
charValue()
Converts thisValue
into a primitivechar
value.char
charValue(char orElse)
int
compareTo(Item other)
int
compareTo(Num that)
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.abstract <T> Output<T>
display(Output<T> output)
Writes a human readable, display-formatted string representation of this object tooutput
.abstract Num
divide(Num that)
Value
divide(Value that)
abstract double
doubleValue()
Converts thisNum
into a primitivedouble
value.double
doubleValue(double orElse)
boolean
equals(Object other)
abstract float
floatValue()
Converts thisNum
into a primitivefloat
value.float
floatValue(float orElse)
abstract Num
floor()
static Num
from(char value)
static Num
from(double value)
static Num
from(float value)
static Num
from(int value)
static Num
from(long value)
static Num
from(Number value)
static Num
from(String value)
static Num
from(BigInteger value)
int
hashCode()
abstract BigInteger
integerValue()
Converts thisNum
into aBigInteger
value.BigInteger
integerValue(BigInteger orElse)
abstract int
intValue()
Converts thisNum
into a primitiveint
value.int
intValue(int orElse)
abstract Num
inverse()
boolean
isConstant()
abstract boolean
isInfinite()
abstract boolean
isNaN()
boolean
isUint32()
boolean
isUint64()
abstract boolean
isValidByte()
abstract boolean
isValidDouble()
abstract boolean
isValidFloat()
abstract boolean
isValidInt()
abstract boolean
isValidInteger()
abstract boolean
isValidLong()
abstract boolean
isValidShort()
abstract long
longValue()
Converts thisNum
into a primitivelong
value.long
longValue(long orElse)
Num
max(Num that)
Num
min(Num that)
abstract Num
minus(Num that)
Value
minus(Value that)
abstract Num
modulo(Num that)
Value
modulo(Value that)
abstract Num
negative()
abstract Number
numberValue()
Converts thisNum
into aNumber
object.Number
numberValue(Number orElse)
abstract Num
plus(Num that)
Value
plus(Value that)
Num
positive()
abstract Num
pow(Num that)
abstract Num
round()
abstract short
shortValue()
Converts thisNum
into a primitiveshort
value.short
shortValue(short orElse)
abstract Num
sqrt()
abstract String
stringValue()
Converts thisNum
into aString
value.String
stringValue(String orElse)
abstract Num
times(Num that)
Value
times(Value that)
int
typeOrder()
Returns the heterogeneous sort order of thisItem
.static Num
uint32(int value)
static Num
uint64(long value)
-
Methods inherited from class swim.structure.Value
absent, alias, and, and, bitwiseAnd, bitwiseOr, bitwiseXor, body, branch, builder, commit, conditional, conditional, contains, containsKey, containsKey, containsValue, divide, empty, eq, eq, extant, flattened, fromObject, ge, ge, get, get, getAttr, getAttr, getField, getField, getItem, getSlot, getSlot, gt, gt, head, header, headers, isAliased, isDefined, isDefinite, isDistinct, isMutable, key, keyEquals, lambda, le, le, length, lt, lt, minus, modulo, ne, ne, not, or, or, plus, removed, removed, tag, tail, target, times, toValue, unflattened
-
Methods inherited from class swim.structure.Item
appended, appended, appended, appended, appended, appended, appended, appended, cast, cast, coerce, coerce, concat, evaluate, evaluate, filter, filter, globalScope, invoke, iterator, max, min, precedence, prepended, prepended, prepended, prepended, prepended, prepended, prepended, prepended, substitute, substitute, toString, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
isConstant
public boolean isConstant()
Description copied from class:Item
- Specified by:
isConstant
in classItem
-
isUint32
public boolean isUint32()
-
isUint64
public boolean isUint64()
-
isNaN
public abstract boolean isNaN()
-
isInfinite
public abstract boolean isInfinite()
-
isValidByte
public abstract boolean isValidByte()
-
isValidShort
public abstract boolean isValidShort()
-
isValidInt
public abstract boolean isValidInt()
-
isValidLong
public abstract boolean isValidLong()
-
isValidFloat
public abstract boolean isValidFloat()
-
isValidDouble
public abstract boolean isValidDouble()
-
isValidInteger
public abstract boolean isValidInteger()
-
stringValue
public abstract String stringValue()
Converts thisNum
into aString
value.- Overrides:
stringValue
in classValue
-
stringValue
public String stringValue(String orElse)
- Overrides:
stringValue
in classValue
-
byteValue
public abstract byte byteValue()
Converts thisNum
into a primitivebyte
value.
-
shortValue
public abstract short shortValue()
Converts thisNum
into a primitiveshort
value.- Overrides:
shortValue
in classValue
-
shortValue
public short shortValue(short orElse)
- Overrides:
shortValue
in classValue
-
intValue
public abstract int intValue()
Converts thisNum
into a primitiveint
value.
-
longValue
public abstract long longValue()
Converts thisNum
into a primitivelong
value.
-
floatValue
public abstract float floatValue()
Converts thisNum
into a primitivefloat
value.- Overrides:
floatValue
in classValue
-
floatValue
public float floatValue(float orElse)
- Overrides:
floatValue
in classValue
-
doubleValue
public abstract double doubleValue()
Converts thisNum
into a primitivedouble
value.- Overrides:
doubleValue
in classValue
-
doubleValue
public double doubleValue(double orElse)
- Overrides:
doubleValue
in classValue
-
integerValue
public abstract BigInteger integerValue()
Converts thisNum
into aBigInteger
value.- Overrides:
integerValue
in classValue
-
integerValue
public BigInteger integerValue(BigInteger orElse)
- Overrides:
integerValue
in classValue
-
numberValue
public abstract Number numberValue()
Converts thisNum
into aNumber
object.- Overrides:
numberValue
in classValue
-
numberValue
public Number numberValue(Number orElse)
- Overrides:
numberValue
in classValue
-
charValue
public abstract char charValue()
Converts thisValue
into a primitivechar
value.
-
booleanValue
public abstract boolean booleanValue()
Converts thisValue
into a primitiveboolean
value.- Overrides:
booleanValue
in classValue
-
booleanValue
public boolean booleanValue(boolean orElse)
- Overrides:
booleanValue
in classValue
-
bitwiseXor
public Value bitwiseXor(Value that)
- Overrides:
bitwiseXor
in classValue
-
bitwiseAnd
public Value bitwiseAnd(Value that)
- Overrides:
bitwiseAnd
in classValue
-
bitwiseNot
public abstract Value bitwiseNot()
- Overrides:
bitwiseNot
in classValue
-
abs
public abstract Num abs()
-
ceil
public abstract Num ceil()
-
floor
public abstract Num floor()
-
round
public abstract Num round()
-
sqrt
public abstract Num sqrt()
-
typeOrder
public int typeOrder()
Description copied from class:Item
Returns the heterogeneous sort order of thisItem
. Used to impose a total order on the set of all items. When comparing two items of different types, the items order according to theirtypeOrder
.
-
compareTo
public int compareTo(Item other)
- Specified by:
compareTo
in interfaceComparable<Item>
- Specified by:
compareTo
in classItem
-
compareTo
public int compareTo(Num that)
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
display
public abstract <T> Output<T> display(Output<T> output)
Description copied from interface:Display
Writes a human readable, display-formatted string representation of this object tooutput
.
-
from
public static Num from(int value)
-
from
public static Num from(long value)
-
from
public static Num from(float value)
-
from
public static Num from(double value)
-
from
public static Num from(BigInteger value)
-
from
public static Num from(char value)
-
uint32
public static Num uint32(int value)
-
uint64
public static Num uint64(long value)
-
-