-
Method Summary
Modifier and TypeMethodDescriptionstatic Item
absent()
abstract void
alias()
abstract Item
appended
(boolean item) appended
(double item) appended
(float item) appended
(int item) appended
(long item) abstract Item
bitwiseAnd
(Item that) abstract Item
abstract Item
abstract Item
bitwiseXor
(Item that) abstract Value
body()
abstract boolean
Converts thisItem
into a primitiveboolean
value, if possible.abstract boolean
booleanValue
(boolean orElse) Converts thisItem
into a primitiveboolean
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveboolean
value.abstract Item
branch()
abstract byte
Converts thisItem
into a primitivebyte
value, if possible.abstract byte
byteValue
(byte orElse) Converts thisItem
into a primitivebyte
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivebyte
value.<T> T
<T> T
abstract char
Converts thisItem
into a primitivechar
value, if possible.abstract char
charValue
(char orElse) Converts thisItem
into a primitivechar
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivechar
value.<T> T
<T> T
abstract Item
commit()
abstract int
abstract Item
conditional
(Item thenTerm, Item elseTerm) abstract boolean
Returnstrue
if thisItem
is aRecord
that has a member equal toitem
; otherwise returnsfalse
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has no member equal toitem
.abstract boolean
containsKey
(String key) abstract boolean
containsKey
(Value key) abstract boolean
containsValue
(Value value) abstract <T> Output<T>
Writes a developer readable, debug-formatted string representation of this object tooutput
.<T> Output<T>
Writes a human readable, display-formatted string representation of this object tooutput
.abstract Item
abstract double
Converts thisItem
into a primitivedouble
value, if possible.abstract double
doubleValue
(double orElse) Converts thisItem
into a primitivedouble
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivedouble
value.static Item
empty()
abstract boolean
evaluate
(Interpreter interpreter) static Item
extant()
filter()
abstract Value
Returns the sole member of thisItem
, if thisItem
is aRecord
with exactly one member, and its member is aValue
; returnsExtant
if thisItem
is an emptyRecord
; returnsAbsent
if thisItem
is aField
; otherwise returnsthis
if thisItem
is aRecord
with more than one member, or if thisItem
is a non-Record
Value
.abstract float
Converts thisItem
into a primitivefloat
value, if possible.abstract float
floatValue
(float orElse) Converts thisItem
into a primitivefloat
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivefloat
value.static Item
fromObject
(Object object) abstract Value
abstract Value
abstract Value
abstract Value
abstract Field
abstract Field
abstract Item
getItem
(int index) abstract Value
abstract Value
static Item
abstract int
hashCode()
abstract Item
head()
abstract Value
Returns the value of the first member of thisItem
, if thisItem
is aRecord
, and its first member is anAttr
whosekey
string is equal totag
; otherwise returnsAbsent
if thisItem
is not aRecord
, or if thisItem
is aRecord
whose first member is not anAttr
, or if thisItem
is aRecord
whose first member is anAttr
whosekey
does not equal thetag
.abstract Record
Returns theunflattened
header
of thisItem
, if thisItem
is aRecord
, and its first member is anAttr
whosekey
string is equal totag
; otherwise returnsnull
.abstract BigInteger
Converts thisItem
into aBigInteger
value, if possible.abstract BigInteger
integerValue
(BigInteger orElse) Converts thisItem
into aBigInteger
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into aBigInteger
value.abstract int
intValue()
Converts thisItem
into a primitiveint
value, if possible.abstract int
intValue
(int orElse) Converts thisItem
into a primitiveint
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveint
value.abstract Item
inverse()
abstract boolean
abstract boolean
abstract boolean
abstract boolean
Returnstrue
if thisItem
is not one of: an emptyRecord
,False
,Extant
, orAbsent
.abstract boolean
abstract boolean
iterator()
abstract Value
key()
abstract boolean
abstract Value
abstract int
length()
Returns the number of members contained in thisItem
, if thisItem
is aRecord
; otherwise returns0
if thisItem
is not aRecord
.abstract long
Converts thisItem
into a primitivelong
value, if possible.abstract long
longValue
(long orElse) Converts thisItem
into a primitivelong
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivelong
value.abstract Item
abstract Item
abstract Item
negative()
abstract Item
not()
abstract Number
Converts thisItem
into aNumber
object, if possible.abstract Number
numberValue
(Number orElse) Converts thisItem
into aNumber
object, if possible; otherwise returnsorElse
if thisItem
can't be converted into aNumber
object.abstract Item
abstract Item
abstract Item
positive()
int
prepended
(boolean item) prepended
(double item) prepended
(float item) prepended
(int item) prepended
(long item) abstract Item
abstract Item
abstract short
Converts thisItem
into a primitiveshort
value, if possible.abstract short
shortValue
(short orElse) Converts thisItem
into a primitiveshort
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveshort
value.abstract String
Converts thisItem
into aString
value, if possible.abstract String
stringValue
(String orElse) Converts thisItem
into aString
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into astring
value.substitute
(Interpreter interpreter) substitute
(Item scope) abstract String
tag()
abstract Record
tail()
Returns a view of all but the first member of thisItem
, if thisItem
is a non-emptyRecord
; otherwise returns an emptyRecord
if thisItem
is not aRecord
, or if thisItem
is itself an emptyRecord
.abstract Value
target()
abstract Item
toString()
abstract Value
toValue()
Returns the value component of thisItem
, if thisItem
is aField
; otherwise returnsthis
if thisItem
is aValue
.abstract int
Returns the heterogeneous sort order of thisItem
.abstract Record
updatedAttr
(String key, boolean value) updatedAttr
(String key, double value) updatedAttr
(String key, float value) updatedAttr
(String key, int value) updatedAttr
(String key, long value) updatedAttr
(String key, String value) updatedAttr
(String key, Value value) updatedAttr
(Text key, boolean value) updatedAttr
(Text key, double value) updatedAttr
(Text key, float value) updatedAttr
(Text key, int value) updatedAttr
(Text key, long value) updatedAttr
(Text key, String value) updatedAttr
(Text key, Value value) updatedSlot
(String key, boolean value) updatedSlot
(String key, double value) updatedSlot
(String key, float value) updatedSlot
(String key, int value) updatedSlot
(String key, long value) updatedSlot
(String key, String value) updatedSlot
(String key, Value value) updatedSlot
(Value key, boolean value) updatedSlot
(Value key, double value) updatedSlot
(Value key, float value) updatedSlot
(Value key, int value) updatedSlot
(Value key, long value) updatedSlot
(Value key, String value) updatedSlot
(Value key, Value value) 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 Details
-
isDefined
public abstract boolean isDefined() -
isDistinct
public abstract boolean isDistinct() -
isDefinite
public abstract boolean isDefinite()Returnstrue
if thisItem
is not one of: an emptyRecord
,False
,Extant
, orAbsent
. -
isConstant
public abstract boolean isConstant() -
key
-
toValue
Returns the value component of thisItem
, if thisItem
is aField
; otherwise returnsthis
if thisItem
is aValue
. -
tag
Returns thekey
string of the first member of thisItem
, if thisItem
is aRecord
, and its first member is anAttr
; otherwise returnsnull
if thisItem
is not aRecord
, or if thisItem
is aRecord
whose first member is not anAttr
.Used to concisely get the name of the discriminating attribute of a structure. The
tag
can be used to discern the nominal type of a polymorphic structure, similar to an XML element tag. -
target
Returns theflattened
members of thisItem
after all attributes have been removed, if thisItem
is aRecord
; otherwise returnsthis
if thisItem
is a non-Record
Value
, or returns the value component if thisItem
is aField
.Used to concisely get the scalar value of an attributed structure. An attributed structure is a
Record
with one or more attributes that modify one or more other members. -
flattened
Returns the sole member of thisItem
, if thisItem
is aRecord
with exactly one member, and its member is aValue
; returnsExtant
if thisItem
is an emptyRecord
; returnsAbsent
if thisItem
is aField
; otherwise returnsthis
if thisItem
is aRecord
with more than one member, or if thisItem
is a non-Record
Value
.Used to convert a unary
Record
into its memberValue
. Facilitates writing code that treats a unaryRecord
equivalently to a bareValue
. -
unflattened
-
header
Returns the value of the first member of thisItem
, if thisItem
is aRecord
, and its first member is anAttr
whosekey
string is equal totag
; otherwise returnsAbsent
if thisItem
is not aRecord
, or if thisItem
is aRecord
whose first member is not anAttr
, or if thisItem
is aRecord
whose first member is anAttr
whosekey
does not equal thetag
.Used to conditionally get the value of the head
Attr
of a structure, if and only if the key string of the headAttr
is equal to thetag
. Can be used to check if a structure might conform to a nominal type namedtag
, while simultaneously getting the value of thetag
attribute. -
headers
Returns theunflattened
header
of thisItem
, if thisItem
is aRecord
, and its first member is anAttr
whosekey
string is equal totag
; otherwise returnsnull
.The
headers
of thetag
attribute of a structure are like the attributes of an XML element tag; through unlike an XML element,tag
attribute headers are not limited to string keys and values. -
head
-
tail
Returns a view of all but the first member of thisItem
, if thisItem
is a non-emptyRecord
; otherwise returns an emptyRecord
if thisItem
is not aRecord
, or if thisItem
is itself an emptyRecord
. -
body
-
length
public abstract int length()Returns the number of members contained in thisItem
, if thisItem
is aRecord
; otherwise returns0
if thisItem
is not aRecord
. -
contains
Returnstrue
if thisItem
is aRecord
that has a member equal toitem
; otherwise returnsfalse
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has no member equal toitem
. -
containsKey
-
containsKey
Returnstrue
if thisItem
is aRecord
that has aField
with aText
key whose string value is equal to the givenkey
; otherwise returnsfalse
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has noField
member with aText
key whose string value equals the givenkey
. Equivalent tocontainsKey(Value)
, but avoids boxing thekey
string into aText
value. -
containsValue
-
get
-
get
Returns the value of the lastField
member of thisItem
with aText
key whose string value is equal to the givenkey
; returnsAbsent
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has noField
member with aText
key whose string value equals the givenkey
. Equivalent toget(Value)
, but avoids boxing thekey
string into aText
value. -
getAttr
-
getAttr
Returns the value of the lastAttr
member of thisItem
with aText
key whose string value is equal to the givenkey
; returnsAbsent
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has noAttr
member with aText
key whose string value equals the givenkey
. Equivalent togetAttr(Text)
, but avoids boxing thekey
string into aText
value. -
getSlot
-
getSlot
Returns the value of the lastSlot
member of thisItem
with aText
key whose string value is equal to the givenkey
; returnsAbsent
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has noSlot
member with aText
key whose string value equals the givenkey
. Equivalent togetSlot(Value)
, but avoids boxing thekey
string into aText
value. -
getField
-
getField
Returns the lastField
member of thisItem
with aText
key whose string value is equal to the givenkey
; returnsnull
if thisItem
is not aRecord
, or if thisItem
is aRecord
, but has noField
member with aText
key whose string value equals the givenkey
. Equivalent togetField(Value)
, but avoids boxing thekey
string into aText
value. -
getItem
-
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
-
appended
-
appended
-
appended
-
appended
-
appended
-
appended
-
appended
-
appended
-
prepended
-
prepended
-
prepended
-
prepended
-
prepended
-
prepended
-
prepended
-
prepended
-
removed
-
removed
-
concat
-
conditional
-
or
-
and
-
bitwiseOr
-
bitwiseXor
-
bitwiseAnd
-
lt
-
le
-
eq
-
ne
-
ge
-
gt
-
plus
-
minus
-
times
-
divide
-
modulo
-
not
-
bitwiseNot
-
negative
-
positive
-
inverse
-
invoke
-
lambda
-
filter
-
filter
-
max
-
min
-
evaluate
-
evaluate
-
substitute
-
substitute
-
stringValue
Converts thisItem
into aString
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into aString
value.
-
stringValue
Converts thisItem
into aString
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into astring
value. -
byteValue
public abstract byte byteValue()Converts thisItem
into a primitivebyte
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitivebyte
value.
-
byteValue
public abstract byte byteValue(byte orElse) Converts thisItem
into a primitivebyte
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivebyte
value. -
shortValue
public abstract short shortValue()Converts thisItem
into a primitiveshort
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitiveshort
value.
-
shortValue
public abstract short shortValue(short orElse) Converts thisItem
into a primitiveshort
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveshort
value. -
intValue
public abstract int intValue()Converts thisItem
into a primitiveint
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitiveint
value.
-
intValue
public abstract int intValue(int orElse) Converts thisItem
into a primitiveint
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveint
value. -
longValue
public abstract long longValue()Converts thisItem
into a primitivelong
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitivelong
value.
-
longValue
public abstract long longValue(long orElse) Converts thisItem
into a primitivelong
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivelong
value. -
floatValue
public abstract float floatValue()Converts thisItem
into a primitivefloat
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitivefloat
value.
-
floatValue
public abstract float floatValue(float orElse) Converts thisItem
into a primitivefloat
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivefloat
value. -
doubleValue
public abstract double doubleValue()Converts thisItem
into a primitivedouble
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitivedouble
value.
-
doubleValue
public abstract double doubleValue(double orElse) Converts thisItem
into a primitivedouble
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivedouble
value. -
integerValue
Converts thisItem
into aBigInteger
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into aBigInteger
value.
-
integerValue
Converts thisItem
into aBigInteger
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into aBigInteger
value. -
numberValue
Converts thisItem
into aNumber
object, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into aNumber
object.
-
numberValue
Converts thisItem
into aNumber
object, if possible; otherwise returnsorElse
if thisItem
can't be converted into aNumber
object. -
charValue
public abstract char charValue()Converts thisItem
into a primitivechar
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitivechar
value.
-
charValue
public abstract char charValue(char orElse) Converts thisItem
into a primitivechar
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitivechar
value. -
booleanValue
public abstract boolean booleanValue()Converts thisItem
into a primitiveboolean
value, if possible.- Throws:
UnsupportedOperationException
- if thisItem
can't be converted into a primitiveboolean
value.
-
booleanValue
public abstract boolean booleanValue(boolean orElse) Converts thisItem
into a primitiveboolean
value, if possible; otherwise returnsorElse
if thisItem
can't be converted into a primitiveboolean
value. -
cast
-
cast
-
coerce
-
coerce
-
isAliased
public abstract boolean isAliased() -
isMutable
public abstract boolean isMutable() -
alias
public abstract void alias() -
branch
-
commit
-
precedence
public int precedence() -
iterator
-
typeOrder
public abstract int typeOrder()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
- Specified by:
compareTo
in interfaceComparable<Item>
-
keyEquals
-
equals
-
hashCode
public abstract int hashCode() -
debug
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
. -
display
Description copied from interface:Display
Writes a human readable, display-formatted string representation of this object tooutput
. -
toString
-
empty
-
extant
-
absent
-
fromObject
-
globalScope
-