- java.lang.Object
-
- swim.structure.Item
-
- swim.structure.Value
-
- swim.structure.Expression
-
public abstract class Expression extends Value
A combination of operators, constants, and variables. EveryItem
in the data model can beevaluated
against a scope. AnExpression
is someValue
that, when evaluated, may yield a different value than theExpression
itself. Note that this is a stricter definition than that of a logical expression; for example, the number2
is a valid expression, but it is not anExpression
.An
Expression
can be either aSelector
or anOperator
. ASelector
references specific attributes of a model instance. AnOperator
identifies an operation on constants, variables, orSelector
expressions. Together, these form a foundation for building expression languages that can both manipulate and read structured objects.
-
-
Constructor Summary
Constructors Constructor Description Expression()
-
Method Summary
-
Methods inherited from class swim.structure.Value
absent, alias, body, booleanValue, booleanValue, branch, builder, byteValue, byteValue, charValue, charValue, commit, contains, containsKey, containsKey, containsValue, doubleValue, doubleValue, empty, extant, flattened, floatValue, floatValue, fromObject, get, get, getAttr, getAttr, getField, getField, getItem, getSlot, getSlot, head, header, headers, integerValue, integerValue, intValue, intValue, isAliased, isDefined, isDefinite, isDistinct, isMutable, key, keyEquals, lambda, length, longValue, longValue, numberValue, numberValue, removed, removed, shortValue, shortValue, stringValue, stringValue, tag, tail, target, toValue, unflattened
-
Methods inherited from class swim.structure.Item
appended, appended, appended, appended, appended, appended, appended, appended, cast, cast, coerce, coerce, compareTo, concat, debug, display, equals, evaluate, evaluate, filter, filter, globalScope, hashCode, invoke, isConstant, iterator, max, min, precedence, prepended, prepended, prepended, prepended, prepended, prepended, prepended, prepended, substitute, substitute, 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
-
conditional
public Item conditional(Item thenTerm, Item elseTerm)
- Overrides:
conditional
in classValue
-
conditional
public Value conditional(Value thenTerm, Value elseTerm)
- Overrides:
conditional
in classValue
-
bitwiseXor
public Operator bitwiseXor(Item that)
- Overrides:
bitwiseXor
in classValue
-
bitwiseXor
public Operator bitwiseXor(Value that)
- Overrides:
bitwiseXor
in classValue
-
bitwiseAnd
public Operator bitwiseAnd(Item that)
- Overrides:
bitwiseAnd
in classValue
-
bitwiseAnd
public Operator bitwiseAnd(Value that)
- Overrides:
bitwiseAnd
in classValue
-
bitwiseNot
public Operator bitwiseNot()
- Overrides:
bitwiseNot
in classValue
-
-