java.lang.Object
swim.structure.Item
swim.structure.Field
- All Implemented Interfaces:
Comparable<Item>
,Iterable<Item>
,Map.Entry<Value,
,Value> Debug
,Display
-
Method Summary
Modifier and TypeMethodDescriptionfinal Value
body()
Always returnsAbsent
because aField
can't be aRecord
, so it can't have any non-first members to flatten, and because aField
isn't a distinctValue
, so it can't returnExtant
.final boolean
Converts the value of thisField
into a primitiveboolean
value, if possible.final boolean
booleanValue
(boolean orElse) Converts the value of thisField
into a primitiveboolean
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveboolean
value.abstract Field
branch()
final byte
Converts the value of thisField
into a primitivebyte
value, if possible.final byte
byteValue
(byte orElse) Converts the value of thisField
into a primitivebyte
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivebyte
value.final char
Converts the value of thisField
into a primitivechar
value, if possible.final char
charValue
(char orElse) Converts the value of thisField
into a primitivechar
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivechar
value.abstract Field
commit()
conditional
(Field thenTerm, Field elseTerm) conditional
(Item thenTerm, Item elseTerm) final boolean
Always returnsfalse
because aField
can't be aRecord
, so it can't have a member equal toitem
.final boolean
containsKey
(String key) Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.final boolean
containsKey
(Value key) Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.final boolean
containsValue
(Value value) Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose value is equal to the givenvalue
.final double
Converts the value of thisField
into a primitivedouble
value, if possible.final double
doubleValue
(double orElse) Converts the value of thisField
into a primitivedouble
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivedouble
value.final Value
final float
Converts the value of thisField
into a primitivefloat
value, if possible.final float
floatValue
(float orElse) Converts the value of thisField
into a primitivefloat
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivefloat
value.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key string is equal to the givenkey
.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key is equal to the givenkey
.final Field
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.final Field
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.final Item
getItem
(int index) Always returnsAbsent
because aField
can't be aRecord
, so it can't have a member at the givenindex
.getKey()
Returns the key component of thisField
.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key string is equal to the givenkey
.final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key is equal to the givenkey
.getValue()
Returns the value component of thisField
.final Item
head()
final Value
Always returnsAbsent
because aField
can't be aRecord
, so it can't have a headAttr
whose value could be returned if its key were equal to thetag
.final Record
Always returnsnull
because aField
can't be aRecord
, so it can't have a headAttr
whose value could be returned as aRecord
if its key is equal to thetag
.final BigInteger
Converts the value of thisField
into aBigInteger
value, if possible.final BigInteger
integerValue
(BigInteger orElse) Converts the value of thisField
into aBigInteger
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into aBigInteger
value.final int
intValue()
Converts the value of thisField
into a primitiveint
value, if possible.final int
intValue
(int orElse) Converts the value of thisField
into a primitiveint
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveint
value.final boolean
boolean
Always returnstrue
because aField
cannot be one of: an emptyRecord
,False
,Extant
, orAbsent
.final boolean
abstract Value
key()
Returns the key component of thisField
.final int
length()
Always returns0
because aField
can't be aRecord
, so it can't contain any members.final long
Converts the value of thisField
into a primitivelong
value, if possible.final long
longValue
(long orElse) Converts the value of thisField
into a primitivelong
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivelong
value.final Number
Converts the value of thisField
into aNumber
object, if possible.final Number
numberValue
(Number orElse) Converts the value of thisField
into aNumber
object, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into aNumber
object.static Field
abstract Value
Sets the value of thisField
to the newvalue
, returning the old value.final short
Converts the value of thisField
into a primitiveshort
value, if possible.final short
shortValue
(short orElse) Converts the value of thisField
into a primitiveshort
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveshort
value.final String
Converts the value of thisField
into aString
value, if possible.final String
stringValue
(String orElse) Converts the value of thisField
into aString
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into astring
value.final String
tag()
Always returnsnull
because aField
can't be aRecord
, so it can't have a first memberAttr
whose key string could be returned.final Record
tail()
Always returns an emptyRecord
because aField
can't itself be aRecord
, so it can't have any non-first members.final Value
target()
Always returns the value component of thisField
.toValue()
Returns the value component of thisField
.final Record
Returns aRecord
containing just thisField
.abstract Field
updatedValue
(Value value) Returns a copy of thisField
with the updatedvalue
.abstract Value
value()
Returns the value component of thisField
.Methods inherited from class swim.structure.Item
absent, alias, appended, appended, appended, appended, appended, appended, appended, appended, bitwiseAnd, bitwiseNot, bitwiseOr, bitwiseXor, cast, cast, coerce, coerce, compareTo, concat, debug, display, divide, empty, eq, equals, evaluate, evaluate, extant, filter, filter, fromObject, ge, globalScope, gt, hashCode, inverse, invoke, isAliased, isConstant, isMutable, iterator, keyEquals, le, lt, max, min, minus, modulo, ne, negative, not, plus, positive, precedence, prepended, prepended, prepended, prepended, prepended, prepended, prepended, prepended, substitute, substitute, times, toString, typeOrder, 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 Details
-
isDefined
public final boolean isDefined() -
isDistinct
public final boolean isDistinct()- Specified by:
isDistinct
in classItem
-
isDefinite
public boolean isDefinite()Always returnstrue
because aField
cannot be one of: an emptyRecord
,False
,Extant
, orAbsent
.- Specified by:
isDefinite
in classItem
-
key
Returns the key component of thisField
. -
getKey
Returns the key component of thisField
. Equivalent tokey()
. -
value
Returns the value component of thisField
. -
getValue
Returns the value component of thisField
. Equivalent tovalue()
. -
setValue
Sets the value of thisField
to the newvalue
, returning the old value.- Specified by:
setValue
in interfaceMap.Entry<Value,
Value> - Throws:
UnsupportedOperationException
- if thisField
is immutable.
-
updatedValue
Returns a copy of thisField
with the updatedvalue
. -
toValue
Returns the value component of thisField
. Equivalent tovalue()
. -
tag
Always returnsnull
because aField
can't be aRecord
, so it can't have a first memberAttr
whose key string could be returned. -
target
Always returns the value component of thisField
. -
flattened
-
unflattened
Returns aRecord
containing just thisField
.- Specified by:
unflattened
in classItem
-
header
Always returnsAbsent
because aField
can't be aRecord
, so it can't have a headAttr
whose value could be returned if its key were equal to thetag
. -
headers
Always returnsnull
because aField
can't be aRecord
, so it can't have a headAttr
whose value could be returned as aRecord
if its key is equal to thetag
. -
head
-
tail
Always returns an emptyRecord
because aField
can't itself be aRecord
, so it can't have any non-first members. -
body
Always returnsAbsent
because aField
can't be aRecord
, so it can't have any non-first members to flatten, and because aField
isn't a distinctValue
, so it can't returnExtant
. -
length
public final int length()Always returns0
because aField
can't be aRecord
, so it can't contain any members. -
contains
Always returnsfalse
because aField
can't be aRecord
, so it can't have a member equal toitem
. -
containsKey
Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.- Specified by:
containsKey
in classItem
-
containsKey
Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.- Specified by:
containsKey
in classItem
-
containsValue
Always returnsfalse
because aField
can't be aRecord
, so it can't have aField
member whose value is equal to the givenvalue
.- Specified by:
containsValue
in classItem
-
get
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
. -
get
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
. -
getAttr
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key is equal to the givenkey
. -
getAttr
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key string is equal to the givenkey
. -
getSlot
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key is equal to the givenkey
. -
getSlot
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key string is equal to the givenkey
. -
getField
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
. -
getField
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
. -
getItem
Always returnsAbsent
because aField
can't be aRecord
, so it can't have a member at the givenindex
. -
removed
-
removed
-
conditional
- Specified by:
conditional
in classItem
-
conditional
-
or
-
or
-
and
-
and
-
lambda
-
stringValue
Converts the value of thisField
into aString
value, if possible.- Specified by:
stringValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into aString
value.
-
stringValue
Converts the value of thisField
into aString
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into astring
value.- Specified by:
stringValue
in classItem
-
byteValue
public final byte byteValue()Converts the value of thisField
into a primitivebyte
value, if possible.- Specified by:
byteValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitivebyte
value.
-
byteValue
public final byte byteValue(byte orElse) Converts the value of thisField
into a primitivebyte
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivebyte
value. -
shortValue
public final short shortValue()Converts the value of thisField
into a primitiveshort
value, if possible.- Specified by:
shortValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitiveshort
value.
-
shortValue
public final short shortValue(short orElse) Converts the value of thisField
into a primitiveshort
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveshort
value.- Specified by:
shortValue
in classItem
-
intValue
public final int intValue()Converts the value of thisField
into a primitiveint
value, if possible.- Specified by:
intValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitiveint
value.
-
intValue
public final int intValue(int orElse) Converts the value of thisField
into a primitiveint
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveint
value. -
longValue
public final long longValue()Converts the value of thisField
into a primitivelong
value, if possible.- Specified by:
longValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitivelong
value.
-
longValue
public final long longValue(long orElse) Converts the value of thisField
into a primitivelong
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivelong
value. -
floatValue
public final float floatValue()Converts the value of thisField
into a primitivefloat
value, if possible.- Specified by:
floatValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitivefloat
value.
-
floatValue
public final float floatValue(float orElse) Converts the value of thisField
into a primitivefloat
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivefloat
value.- Specified by:
floatValue
in classItem
-
doubleValue
public final double doubleValue()Converts the value of thisField
into a primitivedouble
value, if possible.- Specified by:
doubleValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitivedouble
value.
-
doubleValue
public final double doubleValue(double orElse) Converts the value of thisField
into a primitivedouble
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivedouble
value.- Specified by:
doubleValue
in classItem
-
integerValue
Converts the value of thisField
into aBigInteger
value, if possible.- Specified by:
integerValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into aBigInteger
value.
-
integerValue
Converts the value of thisField
into aBigInteger
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into aBigInteger
value.- Specified by:
integerValue
in classItem
-
numberValue
Converts the value of thisField
into aNumber
object, if possible.- Specified by:
numberValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into aNumber
object.
-
numberValue
Converts the value of thisField
into aNumber
object, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into aNumber
object.- Specified by:
numberValue
in classItem
-
charValue
public final char charValue()Converts the value of thisField
into a primitivechar
value, if possible.- Specified by:
charValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitivechar
value.
-
charValue
public final char charValue(char orElse) Converts the value of thisField
into a primitivechar
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitivechar
value. -
booleanValue
public final boolean booleanValue()Converts the value of thisField
into a primitiveboolean
value, if possible.- Specified by:
booleanValue
in classItem
- Throws:
UnsupportedOperationException
- if the value of thisField
can't be converted into a primitiveboolean
value.
-
booleanValue
public final boolean booleanValue(boolean orElse) Converts the value of thisField
into a primitiveboolean
value, if possible; otherwise returnsorElse
if the value of thisField
can't be converted into a primitiveboolean
value.- Specified by:
booleanValue
in classItem
-
branch
-
commit
Description copied from class:Item
-
of
-