-
Method Summary
Modifier and TypeMethodDescriptionstatic Itemabsent()abstract voidalias()abstract Itemappended(boolean item) appended(double item) appended(float item) appended(int item) appended(long item) abstract ItembitwiseAnd(Item that) abstract Itemabstract Itemabstract ItembitwiseXor(Item that) abstract Valuebody()abstract booleanConverts thisIteminto a primitivebooleanvalue, if possible.abstract booleanbooleanValue(boolean orElse) Converts thisIteminto a primitivebooleanvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebooleanvalue.abstract Itembranch()abstract byteConverts thisIteminto a primitivebytevalue, if possible.abstract bytebyteValue(byte orElse) Converts thisIteminto a primitivebytevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebytevalue.<T> T<T> Tabstract charConverts thisIteminto a primitivecharvalue, if possible.abstract charcharValue(char orElse) Converts thisIteminto a primitivecharvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivecharvalue.<T> T<T> Tabstract Itemcommit()abstract intabstract Itemconditional(Item thenTerm, Item elseTerm) abstract booleanReturnstrueif thisItemis aRecordthat has a member equal toitem; otherwise returnsfalseif thisItemis not aRecord, or if thisItemis aRecord, but has no member equal toitem.abstract booleancontainsKey(String key) abstract booleancontainsKey(Value key) abstract booleancontainsValue(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 Itemabstract doubleConverts thisIteminto a primitivedoublevalue, if possible.abstract doubledoubleValue(double orElse) Converts thisIteminto a primitivedoublevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivedoublevalue.static Itemempty()abstract booleanevaluate(Interpreter interpreter) static Itemextant()filter()abstract ValueReturns the sole member of thisItem, if thisItemis aRecordwith exactly one member, and its member is aValue; returnsExtantif thisItemis an emptyRecord; returnsAbsentif thisItemis aField; otherwise returnsthisif thisItemis aRecordwith more than one member, or if thisItemis a non-RecordValue.abstract floatConverts thisIteminto a primitivefloatvalue, if possible.abstract floatfloatValue(float orElse) Converts thisIteminto a primitivefloatvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivefloatvalue.static ItemfromObject(Object object) abstract Valueabstract Valueabstract Valueabstract Valueabstract Fieldabstract Fieldabstract ItemgetItem(int index) abstract Valueabstract Valuestatic Itemabstract inthashCode()abstract Itemhead()abstract ValueReturns the value of the first member of thisItem, if thisItemis aRecord, and its first member is anAttrwhosekeystring is equal totag; otherwise returnsAbsentif thisItemis not aRecord, or if thisItemis aRecordwhose first member is not anAttr, or if thisItemis aRecordwhose first member is anAttrwhosekeydoes not equal thetag.abstract RecordReturns theunflattenedheaderof thisItem, if thisItemis aRecord, and its first member is anAttrwhosekeystring is equal totag; otherwise returnsnull.abstract BigIntegerConverts thisIteminto aBigIntegervalue, if possible.abstract BigIntegerintegerValue(BigInteger orElse) Converts thisIteminto aBigIntegervalue, if possible; otherwise returnsorElseif thisItemcan't be converted into aBigIntegervalue.abstract intintValue()Converts thisIteminto a primitiveintvalue, if possible.abstract intintValue(int orElse) Converts thisIteminto a primitiveintvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveintvalue.abstract Iteminverse()abstract booleanabstract booleanabstract booleanabstract booleanReturnstrueif thisItemis not one of: an emptyRecord,False,Extant, orAbsent.abstract booleanabstract booleaniterator()abstract Valuekey()abstract booleanabstract Valueabstract intlength()Returns the number of members contained in thisItem, if thisItemis aRecord; otherwise returns0if thisItemis not aRecord.abstract longConverts thisIteminto a primitivelongvalue, if possible.abstract longlongValue(long orElse) Converts thisIteminto a primitivelongvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivelongvalue.abstract Itemabstract Itemabstract Itemnegative()abstract Itemnot()abstract NumberConverts thisIteminto aNumberobject, if possible.abstract NumbernumberValue(Number orElse) Converts thisIteminto aNumberobject, if possible; otherwise returnsorElseif thisItemcan't be converted into aNumberobject.abstract Itemabstract Itemabstract Itempositive()intprepended(boolean item) prepended(double item) prepended(float item) prepended(int item) prepended(long item) abstract Itemabstract Itemabstract shortConverts thisIteminto a primitiveshortvalue, if possible.abstract shortshortValue(short orElse) Converts thisIteminto a primitiveshortvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveshortvalue.abstract StringConverts thisIteminto aStringvalue, if possible.abstract StringstringValue(String orElse) Converts thisIteminto aStringvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into astringvalue.substitute(Interpreter interpreter) substitute(Item scope) abstract Stringtag()abstract Recordtail()Returns a view of all but the first member of thisItem, if thisItemis a non-emptyRecord; otherwise returns an emptyRecordif thisItemis not aRecord, or if thisItemis itself an emptyRecord.abstract Valuetarget()abstract ItemtoString()abstract ValuetoValue()Returns the value component of thisItem, if thisItemis aField; otherwise returnsthisif thisItemis aValue.abstract intReturns the heterogeneous sort order of thisItem.abstract RecordupdatedAttr(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, waitMethods 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()Returnstrueif thisItemis not one of: an emptyRecord,False,Extant, orAbsent. -
isConstant
public abstract boolean isConstant() -
key
-
toValue
Returns the value component of thisItem, if thisItemis aField; otherwise returnsthisif thisItemis aValue. -
tag
Returns thekeystring of the first member of thisItem, if thisItemis aRecord, and its first member is anAttr; otherwise returnsnullif thisItemis not aRecord, or if thisItemis aRecordwhose first member is not anAttr.Used to concisely get the name of the discriminating attribute of a structure. The
tagcan be used to discern the nominal type of a polymorphic structure, similar to an XML element tag. -
target
Returns theflattenedmembers of thisItemafter all attributes have been removed, if thisItemis aRecord; otherwise returnsthisif thisItemis a non-RecordValue, or returns the value component if thisItemis aField.Used to concisely get the scalar value of an attributed structure. An attributed structure is a
Recordwith one or more attributes that modify one or more other members. -
flattened
Returns the sole member of thisItem, if thisItemis aRecordwith exactly one member, and its member is aValue; returnsExtantif thisItemis an emptyRecord; returnsAbsentif thisItemis aField; otherwise returnsthisif thisItemis aRecordwith more than one member, or if thisItemis a non-RecordValue.Used to convert a unary
Recordinto its memberValue. Facilitates writing code that treats a unaryRecordequivalently to a bareValue. -
unflattened
-
header
Returns the value of the first member of thisItem, if thisItemis aRecord, and its first member is anAttrwhosekeystring is equal totag; otherwise returnsAbsentif thisItemis not aRecord, or if thisItemis aRecordwhose first member is not anAttr, or if thisItemis aRecordwhose first member is anAttrwhosekeydoes not equal thetag.Used to conditionally get the value of the head
Attrof a structure, if and only if the key string of the headAttris equal to thetag. Can be used to check if a structure might conform to a nominal type namedtag, while simultaneously getting the value of thetagattribute. -
headers
Returns theunflattenedheaderof thisItem, if thisItemis aRecord, and its first member is anAttrwhosekeystring is equal totag; otherwise returnsnull.The
headersof thetagattribute of a structure are like the attributes of an XML element tag; through unlike an XML element,tagattribute headers are not limited to string keys and values. -
head
-
tail
Returns a view of all but the first member of thisItem, if thisItemis a non-emptyRecord; otherwise returns an emptyRecordif thisItemis not aRecord, or if thisItemis itself an emptyRecord. -
body
-
length
public abstract int length()Returns the number of members contained in thisItem, if thisItemis aRecord; otherwise returns0if thisItemis not aRecord. -
contains
Returnstrueif thisItemis aRecordthat has a member equal toitem; otherwise returnsfalseif thisItemis not aRecord, or if thisItemis aRecord, but has no member equal toitem. -
containsKey
-
containsKey
Returnstrueif thisItemis aRecordthat has aFieldwith aTextkey whose string value is equal to the givenkey; otherwise returnsfalseif thisItemis not aRecord, or if thisItemis aRecord, but has noFieldmember with aTextkey whose string value equals the givenkey. Equivalent tocontainsKey(Value), but avoids boxing thekeystring into aTextvalue. -
containsValue
-
get
-
get
Returns the value of the lastFieldmember of thisItemwith aTextkey whose string value is equal to the givenkey; returnsAbsentif thisItemis not aRecord, or if thisItemis aRecord, but has noFieldmember with aTextkey whose string value equals the givenkey. Equivalent toget(Value), but avoids boxing thekeystring into aTextvalue. -
getAttr
-
getAttr
Returns the value of the lastAttrmember of thisItemwith aTextkey whose string value is equal to the givenkey; returnsAbsentif thisItemis not aRecord, or if thisItemis aRecord, but has noAttrmember with aTextkey whose string value equals the givenkey. Equivalent togetAttr(Text), but avoids boxing thekeystring into aTextvalue. -
getSlot
-
getSlot
Returns the value of the lastSlotmember of thisItemwith aTextkey whose string value is equal to the givenkey; returnsAbsentif thisItemis not aRecord, or if thisItemis aRecord, but has noSlotmember with aTextkey whose string value equals the givenkey. Equivalent togetSlot(Value), but avoids boxing thekeystring into aTextvalue. -
getField
-
getField
Returns the lastFieldmember of thisItemwith aTextkey whose string value is equal to the givenkey; returnsnullif thisItemis not aRecord, or if thisItemis aRecord, but has noFieldmember with aTextkey whose string value equals the givenkey. Equivalent togetField(Value), but avoids boxing thekeystring into aTextvalue. -
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 thisIteminto aStringvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into aStringvalue.
-
stringValue
Converts thisIteminto aStringvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into astringvalue. -
byteValue
public abstract byte byteValue()Converts thisIteminto a primitivebytevalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivebytevalue.
-
byteValue
public abstract byte byteValue(byte orElse) Converts thisIteminto a primitivebytevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebytevalue. -
shortValue
public abstract short shortValue()Converts thisIteminto a primitiveshortvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitiveshortvalue.
-
shortValue
public abstract short shortValue(short orElse) Converts thisIteminto a primitiveshortvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveshortvalue. -
intValue
public abstract int intValue()Converts thisIteminto a primitiveintvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitiveintvalue.
-
intValue
public abstract int intValue(int orElse) Converts thisIteminto a primitiveintvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveintvalue. -
longValue
public abstract long longValue()Converts thisIteminto a primitivelongvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivelongvalue.
-
longValue
public abstract long longValue(long orElse) Converts thisIteminto a primitivelongvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivelongvalue. -
floatValue
public abstract float floatValue()Converts thisIteminto a primitivefloatvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivefloatvalue.
-
floatValue
public abstract float floatValue(float orElse) Converts thisIteminto a primitivefloatvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivefloatvalue. -
doubleValue
public abstract double doubleValue()Converts thisIteminto a primitivedoublevalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivedoublevalue.
-
doubleValue
public abstract double doubleValue(double orElse) Converts thisIteminto a primitivedoublevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivedoublevalue. -
integerValue
Converts thisIteminto aBigIntegervalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into aBigIntegervalue.
-
integerValue
Converts thisIteminto aBigIntegervalue, if possible; otherwise returnsorElseif thisItemcan't be converted into aBigIntegervalue. -
numberValue
Converts thisIteminto aNumberobject, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into aNumberobject.
-
numberValue
Converts thisIteminto aNumberobject, if possible; otherwise returnsorElseif thisItemcan't be converted into aNumberobject. -
charValue
public abstract char charValue()Converts thisIteminto a primitivecharvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivecharvalue.
-
charValue
public abstract char charValue(char orElse) Converts thisIteminto a primitivecharvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivecharvalue. -
booleanValue
public abstract boolean booleanValue()Converts thisIteminto a primitivebooleanvalue, if possible.- Throws:
UnsupportedOperationException- if thisItemcan't be converted into a primitivebooleanvalue.
-
booleanValue
public abstract boolean booleanValue(boolean orElse) Converts thisIteminto a primitivebooleanvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebooleanvalue. -
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:
compareToin interfaceComparable<Item>
-
keyEquals
-
equals
-
hashCode
public abstract int hashCode() -
debug
Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput. -
display
Description copied from interface:DisplayWrites a human readable, display-formatted string representation of this object tooutput. -
toString
-
empty
-
extant
-
absent
-
fromObject
-
globalScope
-