- java.lang.Object
-
- swim.structure.Item
-
- swim.structure.Field
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Field
and(Field that)
Item
and(Item that)
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
.boolean
booleanValue()
Converts the value of thisField
into a primitiveboolean
value, if possible.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()
byte
byteValue()
Converts the value of thisField
into a primitivebyte
value, if possible.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.char
charValue()
Converts the value of thisField
into a primitivechar
value, if possible.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()
Field
conditional(Field thenTerm, Field elseTerm)
Item
conditional(Item thenTerm, Item elseTerm)
boolean
contains(Item item)
Always returnsfalse
because aField
can't be aRecord
, so it can't have a member equal toitem
.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
.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
.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
.double
doubleValue()
Converts the value of thisField
into a primitivedouble
value, if possible.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.Value
flattened()
float
floatValue()
Converts the value of thisField
into a primitivefloat
value, if possible.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.Value
get(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.Value
get(Value key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.Value
getAttr(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key string is equal to the givenkey
.Value
getAttr(Text key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key is equal to the givenkey
.Field
getField(String key)
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.Field
getField(Value key)
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.Item
getItem(int index)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have a member at the givenindex
.Value
getKey()
Returns the key component of thisField
.Value
getSlot(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key string is equal to the givenkey
.Value
getSlot(Value key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key is equal to the givenkey
.Value
getValue()
Returns the value component of thisField
.Item
head()
Value
header(String tag)
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
.Record
headers(String tag)
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
.BigInteger
integerValue()
Converts the value of thisField
into aBigInteger
value, if possible.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.int
intValue()
Converts the value of thisField
into a primitiveint
value, if possible.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.boolean
isDefined()
boolean
isDefinite()
Always returnstrue
because aField
cannot be one of: an emptyRecord
,False
,Extant
, orAbsent
.boolean
isDistinct()
abstract Value
key()
Returns the key component of thisField
.Value
lambda(Value template)
int
length()
Always returns0
because aField
can't be aRecord
, so it can't contain any members.long
longValue()
Converts the value of thisField
into a primitivelong
value, if possible.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.Number
numberValue()
Converts the value of thisField
into aNumber
object, if possible.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
of(Object object)
Field
or(Field that)
Item
or(Item that)
Field
removed(String key)
Field
removed(Value key)
abstract Value
setValue(Value value)
Sets the value of thisField
to the newvalue
, returning the old value.short
shortValue()
Converts the value of thisField
into a primitiveshort
value, if possible.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.String
stringValue()
Converts the value of thisField
into aString
value, if possible.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.String
tag()
Always returnsnull
because aField
can't be aRecord
, so it can't have a first memberAttr
whose key string could be returned.Record
tail()
Always returns an emptyRecord
because aField
can't itself be aRecord
, so it can't have any non-first members.Value
target()
Always returns the value component of thisField
.Value
toValue()
Returns the value component of thisField
.Record
unflattened()
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 Detail
-
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
public abstract Value key()
Returns the key component of thisField
.
-
value
public abstract Value value()
Returns the value component of thisField
.
-
setValue
public abstract Value setValue(Value value)
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
public abstract Field updatedValue(Value value)
Returns a copy of thisField
with the updatedvalue
.
-
tag
public 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.
-
target
public final Value target()
Always returns the value component of thisField
.
-
unflattened
public final Record unflattened()
Returns aRecord
containing just thisField
.- Specified by:
unflattened
in classItem
-
header
public final Value header(String tag)
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
public final Record headers(String tag)
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
.
-
tail
public final Record tail()
Always returns an emptyRecord
because aField
can't itself be aRecord
, so it can't have any non-first members.
-
body
public final 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
.
-
length
public final int length()
Always returns0
because aField
can't be aRecord
, so it can't contain any members.
-
contains
public final boolean contains(Item item)
Always returnsfalse
because aField
can't be aRecord
, so it can't have a member equal toitem
.
-
containsKey
public 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
.- Specified by:
containsKey
in classItem
-
containsKey
public 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
.- Specified by:
containsKey
in classItem
-
containsValue
public 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
.- Specified by:
containsValue
in classItem
-
get
public final Value get(Value key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.
-
get
public final Value get(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.
-
getAttr
public final Value getAttr(Text key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key is equal to the givenkey
.
-
getAttr
public final Value getAttr(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have anAttr
member whose key string is equal to the givenkey
.
-
getSlot
public final Value getSlot(Value key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key is equal to the givenkey
.
-
getSlot
public final Value getSlot(String key)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have aSlot
member whose key string is equal to the givenkey
.
-
getField
public final Field getField(Value key)
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key is equal to the givenkey
.
-
getField
public final Field getField(String key)
Always returnsnull
because aField
can't be aRecord
, so it can't have aField
member whose key string is equal to the givenkey
.
-
getItem
public final Item getItem(int index)
Always returnsAbsent
because aField
can't be aRecord
, so it can't have a member at the givenindex
.
-
conditional
public Item conditional(Item thenTerm, Item elseTerm)
- Specified by:
conditional
in classItem
-
stringValue
public final String 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
public 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.- 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
public final BigInteger 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
public 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.- Specified by:
integerValue
in classItem
-
numberValue
public final Number 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
public 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.- 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
-
-