- java.lang.Object
- 
- swim.structure.Item
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Itemabsent()abstract voidalias()abstract Itemand(Item that)Recordappended(boolean item)Recordappended(double item)Recordappended(float item)Recordappended(int item)Recordappended(long item)Recordappended(Object... items)Recordappended(String item)Recordappended(Item item)abstract ItembitwiseAnd(Item that)abstract ItembitwiseNot()abstract ItembitwiseOr(Item that)abstract ItembitwiseXor(Item that)abstract Valuebody()abstract booleanbooleanValue()Converts 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 bytebyteValue()Converts 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> Tcast(Form<T> form)<T> Tcast(Form<T> form, T orElse)abstract charcharValue()Converts 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> Tcoerce(Form<T> form)<T> Tcoerce(Form<T> form, T orElse)abstract Itemcommit()abstract intcompareTo(Item other)Recordconcat(Item that)abstract Itemconditional(Item thenTerm, Item elseTerm)abstract booleancontains(Item item)Returnstrueif 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 voiddebug(Output<?> output)Writes a developer readable, debug-formatted string representation of this object tooutput.voiddisplay(Output<?> output)Writes a human readable, display-formatted string representation of this object tooutput.abstract Itemdivide(Item that)abstract doubledoubleValue()Converts 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()Itemeq(Item that)abstract booleanequals(Object other)Itemevaluate(Interpreter interpreter)Itemevaluate(Item scope)static Itemextant()Selectorfilter()Selectorfilter(Item predicate)abstract Valueflattened()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.abstract floatfloatValue()Converts 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)Itemge(Item that)abstract Valueget(String key)abstract Valueget(Value key)abstract ValuegetAttr(String key)abstract ValuegetAttr(Text key)abstract FieldgetField(String key)abstract FieldgetField(Value key)abstract ItemgetItem(int index)abstract ValuegetSlot(String key)abstract ValuegetSlot(Value key)static ItemglobalScope()Itemgt(Item that)abstract inthashCode()abstract Itemhead()abstract Valueheader(String tag)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.abstract Recordheaders(String tag)Returns theunflattenedheaderof thisItem, if thisItemis aRecord, and its first member is anAttrwhosekeystring is equal totag; otherwise returnsnull.abstract BigIntegerintegerValue()Converts 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()Iteminvoke(Value args)abstract booleanisAliased()abstract booleanisConstant()abstract booleanisDefined()abstract booleanisDefinite()Returnstrueif thisItemis not one of: an emptyRecord,False,Extant, orAbsent.abstract booleanisDistinct()abstract booleanisMutable()Iterator<Item>iterator()abstract Valuekey()abstract booleankeyEquals(Object key)abstract Valuelambda(Value template)Itemle(Item that)abstract intlength()Returns the number of members contained in thisItem, if thisItemis aRecord; otherwise returns0if thisItemis not aRecord.abstract longlongValue()Converts thisIteminto a primitivelongvalue, if possible.abstract longlongValue(long orElse)Converts thisIteminto a primitivelongvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivelongvalue.Itemlt(Item that)Itemmax(Item that)Itemmin(Item that)abstract Itemminus(Item that)abstract Itemmodulo(Item that)Itemne(Item that)abstract Itemnegative()abstract Itemnot()abstract NumbernumberValue()Converts thisIteminto aNumberobject, if possible.abstract NumbernumberValue(Number orElse)Converts thisIteminto aNumberobject, if possible; otherwise returnsorElseif thisItemcan't be converted into aNumberobject.abstract Itemor(Item that)abstract Itemplus(Item that)abstract Itempositive()intprecedence()Recordprepended(boolean item)Recordprepended(double item)Recordprepended(float item)Recordprepended(int item)Recordprepended(long item)Recordprepended(Object... items)Recordprepended(String item)Recordprepended(Item item)abstract Itemremoved(String key)abstract Itemremoved(Value key)abstract shortshortValue()Converts 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 StringstringValue()Converts thisIteminto aStringvalue, if possible.abstract StringstringValue(String orElse)Converts thisIteminto aStringvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into astringvalue.Itemsubstitute(Interpreter interpreter)Itemsubstitute(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 Itemtimes(Item that)StringtoString()abstract ValuetoValue()Returns the value component of thisItem, if thisItemis aField; otherwise returnsthisif thisItemis aValue.abstract inttypeOrder()Returns the heterogeneous sort order of thisItem.abstract Recordunflattened()Recordupdated(String key, boolean value)Recordupdated(String key, double value)Recordupdated(String key, float value)Recordupdated(String key, int value)Recordupdated(String key, long value)Recordupdated(String key, String value)Recordupdated(String key, Value value)Recordupdated(Value key, boolean value)Recordupdated(Value key, double value)Recordupdated(Value key, float value)Recordupdated(Value key, int value)Recordupdated(Value key, long value)Recordupdated(Value key, String value)Recordupdated(Value key, Value value)RecordupdatedAttr(String key, boolean value)RecordupdatedAttr(String key, double value)RecordupdatedAttr(String key, float value)RecordupdatedAttr(String key, int value)RecordupdatedAttr(String key, long value)RecordupdatedAttr(String key, String value)RecordupdatedAttr(String key, Value value)RecordupdatedAttr(Text key, boolean value)RecordupdatedAttr(Text key, double value)RecordupdatedAttr(Text key, float value)RecordupdatedAttr(Text key, int value)RecordupdatedAttr(Text key, long value)RecordupdatedAttr(Text key, String value)RecordupdatedAttr(Text key, Value value)RecordupdatedSlot(String key, boolean value)RecordupdatedSlot(String key, double value)RecordupdatedSlot(String key, float value)RecordupdatedSlot(String key, int value)RecordupdatedSlot(String key, long value)RecordupdatedSlot(String key, String value)RecordupdatedSlot(String key, Value value)RecordupdatedSlot(Value key, boolean value)RecordupdatedSlot(Value key, double value)RecordupdatedSlot(Value key, float value)RecordupdatedSlot(Value key, int value)RecordupdatedSlot(Value key, long value)RecordupdatedSlot(Value key, String value)RecordupdatedSlot(Value key, Value value)- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
isDefinedpublic abstract boolean isDefined() 
 - 
isDistinctpublic abstract boolean isDistinct() 
 - 
isDefinitepublic abstract boolean isDefinite() Returnstrueif thisItemis not one of: an emptyRecord,False,Extant, orAbsent.
 - 
isConstantpublic abstract boolean isConstant() 
 - 
keypublic abstract Value key() 
 - 
toValuepublic abstract Value toValue() Returns the value component of thisItem, if thisItemis aField; otherwise returnsthisif thisItemis aValue.
 - 
tagpublic abstract String 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.
 - 
targetpublic abstract Value 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.
 - 
flattenedpublic abstract Value 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.
 - 
unflattenedpublic abstract Record unflattened() 
 - 
headerpublic abstract Value header(String tag) 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.
 - 
headerspublic abstract Record headers(String tag) 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.
 - 
headpublic abstract Item head() 
 - 
tailpublic abstract Record 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.
 - 
bodypublic abstract Value body() 
 - 
lengthpublic abstract int length() Returns the number of members contained in thisItem, if thisItemis aRecord; otherwise returns0if thisItemis not aRecord.
 - 
containspublic abstract boolean contains(Item item) Returnstrueif thisItemis aRecordthat has a member equal toitem; otherwise returnsfalseif thisItemis not aRecord, or if thisItemis aRecord, but has no member equal toitem.
 - 
containsKeypublic abstract boolean containsKey(Value key) 
 - 
containsKeypublic abstract boolean containsKey(String key) 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.
 - 
containsValuepublic abstract boolean containsValue(Value value) 
 - 
getpublic abstract Value get(String key) 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.
 - 
getAttrpublic abstract Value getAttr(String key) 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.
 - 
getSlotpublic abstract Value getSlot(String key) 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.
 - 
getFieldpublic abstract Field getField(String key) 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.
 - 
getItempublic abstract Item getItem(int index) 
 - 
appendedpublic Record appended(int item) 
 - 
appendedpublic Record appended(long item) 
 - 
appendedpublic Record appended(float item) 
 - 
appendedpublic Record appended(double item) 
 - 
appendedpublic Record appended(boolean item) 
 - 
prependedpublic Record prepended(int item) 
 - 
prependedpublic Record prepended(long item) 
 - 
prependedpublic Record prepended(float item) 
 - 
prependedpublic Record prepended(double item) 
 - 
prependedpublic Record prepended(boolean item) 
 - 
notpublic abstract Item not() 
 - 
bitwiseNotpublic abstract Item bitwiseNot() 
 - 
negativepublic abstract Item negative() 
 - 
positivepublic abstract Item positive() 
 - 
inversepublic abstract Item inverse() 
 - 
filterpublic Selector filter() 
 - 
evaluatepublic Item evaluate(Interpreter interpreter) 
 - 
substitutepublic Item substitute(Interpreter interpreter) 
 - 
stringValuepublic abstract String stringValue() Converts thisIteminto aStringvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a- Stringvalue.
 
 - 
stringValuepublic abstract String stringValue(String orElse) Converts thisIteminto aStringvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into astringvalue.
 - 
byteValuepublic abstract byte byteValue() Converts thisIteminto a primitivebytevalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- bytevalue.
 
 - 
byteValuepublic abstract byte byteValue(byte orElse) Converts thisIteminto a primitivebytevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebytevalue.
 - 
shortValuepublic abstract short shortValue() Converts thisIteminto a primitiveshortvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- shortvalue.
 
 - 
shortValuepublic abstract short shortValue(short orElse) Converts thisIteminto a primitiveshortvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveshortvalue.
 - 
intValuepublic abstract int intValue() Converts thisIteminto a primitiveintvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- intvalue.
 
 - 
intValuepublic abstract int intValue(int orElse) Converts thisIteminto a primitiveintvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitiveintvalue.
 - 
longValuepublic abstract long longValue() Converts thisIteminto a primitivelongvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- longvalue.
 
 - 
longValuepublic abstract long longValue(long orElse) Converts thisIteminto a primitivelongvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivelongvalue.
 - 
floatValuepublic abstract float floatValue() Converts thisIteminto a primitivefloatvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- floatvalue.
 
 - 
floatValuepublic abstract float floatValue(float orElse) Converts thisIteminto a primitivefloatvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivefloatvalue.
 - 
doubleValuepublic abstract double doubleValue() Converts thisIteminto a primitivedoublevalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- doublevalue.
 
 - 
doubleValuepublic abstract double doubleValue(double orElse) Converts thisIteminto a primitivedoublevalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivedoublevalue.
 - 
integerValuepublic abstract BigInteger integerValue() Converts thisIteminto aBigIntegervalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a- BigIntegervalue.
 
 - 
integerValuepublic abstract BigInteger integerValue(BigInteger orElse) Converts thisIteminto aBigIntegervalue, if possible; otherwise returnsorElseif thisItemcan't be converted into aBigIntegervalue.
 - 
numberValuepublic abstract Number numberValue() Converts thisIteminto aNumberobject, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a- Numberobject.
 
 - 
numberValuepublic abstract Number numberValue(Number orElse) Converts thisIteminto aNumberobject, if possible; otherwise returnsorElseif thisItemcan't be converted into aNumberobject.
 - 
charValuepublic abstract char charValue() Converts thisIteminto a primitivecharvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- charvalue.
 
 - 
charValuepublic abstract char charValue(char orElse) Converts thisIteminto a primitivecharvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivecharvalue.
 - 
booleanValuepublic abstract boolean booleanValue() Converts thisIteminto a primitivebooleanvalue, if possible.- Throws:
- UnsupportedOperationException- if this- Itemcan't be converted into a primitive- booleanvalue.
 
 - 
booleanValuepublic abstract boolean booleanValue(boolean orElse) Converts thisIteminto a primitivebooleanvalue, if possible; otherwise returnsorElseif thisItemcan't be converted into a primitivebooleanvalue.
 - 
castpublic <T> T cast(Form<T> form) 
 - 
castpublic <T> T cast(Form<T> form, T orElse) 
 - 
coercepublic <T> T coerce(Form<T> form) 
 - 
coercepublic <T> T coerce(Form<T> form, T orElse) 
 - 
isAliasedpublic abstract boolean isAliased() 
 - 
isMutablepublic abstract boolean isMutable() 
 - 
aliaspublic abstract void alias() 
 - 
branchpublic abstract Item branch() 
 - 
commitpublic abstract Item commit() 
 - 
precedencepublic int precedence() 
 - 
typeOrderpublic 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.
 - 
compareTopublic abstract int compareTo(Item other) - Specified by:
- compareToin interface- Comparable<Item>
 
 - 
keyEqualspublic abstract boolean keyEquals(Object key) 
 - 
debugpublic abstract void debug(Output<?> output) Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput.
 - 
displaypublic void display(Output<?> output) Description copied from interface:DisplayWrites a human readable, display-formatted string representation of this object tooutput.
 - 
emptypublic static Item empty() 
 - 
extantpublic static Item extant() 
 - 
absentpublic static Item absent() 
 - 
globalScopepublic static Item globalScope() 
 
- 
 
-