public interface Value
| Modifier and Type | Field and Description |
|---|---|
static int |
EQ
Flag mask value for use with
compare(). |
static int |
GT
Flag mask value for use with
compare(). |
static int |
LT
Flag mask value for use with
compare(). |
static Value |
NO_VALUE
Special value that can be used to indicate "no value" in certain situations, such as return value
from a method returning void.
|
| Modifier and Type | Method and Description |
|---|---|
Value |
add(ParseSession session,
Value that)
Add or concatenate this value.
|
Value |
and(ParseSession session,
Value that)
And this value.
|
LValue |
asLValue(String operation)
Verify that this instance is actually an
LValue. |
boolean |
checkBoolean(ParseSession session,
String operation)
Evaluate this value, verify that it has boolean type, and return it.
|
int |
checkIntegral(ParseSession session,
String operation)
Evaluate this value, verify that it has integral type (i.e., byte, char, short, or int), and return it.
|
Object |
checkNotNull(ParseSession session,
String operation)
Evaluate this value, verify that it is not null, and return it.
|
Number |
checkNumeric(ParseSession session,
String operation)
Evaluate this value, verify that it has numeric type (i.e.,
Number), and return it. |
<T> T |
checkType(ParseSession session,
String operation,
Class<T> type)
Evaluate this value, verify that it has the expected type (or any sub-type), and return it.
|
Value |
compare(ParseSession session,
Value that,
int mask)
Ordered comparison to another value.
|
Value |
divide(ParseSession session,
Value that)
Divide this value.
|
Object |
get(ParseSession session)
Evaluate this value within the given context.
|
Class<?> |
getType(ParseSession session)
Get the type of this value without evaluating it.
|
Value |
invert(ParseSession session)
Bitwise invert this value.
|
Value |
lshift(ParseSession session,
Value arg)
Left shift this value.
|
Value |
mod(ParseSession session,
Value that)
Modulo this value.
|
Value |
multiply(ParseSession session,
Value that)
Multiply this value.
|
Value |
negate(ParseSession session)
Negate this value.
|
Value |
or(ParseSession session,
Value that)
Or this value.
|
Value |
rshift(ParseSession session,
Value arg)
Right shift this value.
|
Value |
subtract(ParseSession session,
Value that)
Subtract this value.
|
Value |
urshift(ParseSession session,
Value arg)
Unsigned right shift this value.
|
Value |
xor(ParseSession session,
Value that)
Xor this value.
|
Value |
xxcrement(ParseSession session,
String operation,
boolean increment)
Increment/decrement this value.
|
static final int LT
compare().static final int GT
compare().static final int EQ
compare().static final Value NO_VALUE
Object get(ParseSession session)
Normally this method should only be invoked once, and the result cached, because evaluation could have side effects.
session - parse sessionClass<?> getType(ParseSession session)
This should perform a best-effort attempt to determine the type, but should not invoke get().
If the type is unknown, Object.class should be returned.
session - parse sessionObject checkNotNull(ParseSession session, String operation)
session - current sessionoperation - description of operation for error messagesEvalException - if this value is nullboolean checkBoolean(ParseSession session, String operation)
session - current sessionoperation - description of operation for error messagesEvalException - if this value is not booleanNumber checkNumeric(ParseSession session, String operation)
Number), and return it.session - current sessionoperation - description of operation for error messagesEvalException - if this value is not numericint checkIntegral(ParseSession session, String operation)
session - current sessionoperation - description of operation for error messagesEvalException - if this value is not integral<T> T checkType(ParseSession session, String operation, Class<T> type)
T - expected typesession - current sessionoperation - description of operation for error messagestype - expected typetypeEvalException - if this value does not have the expected typeValue xxcrement(ParseSession session, String operation, boolean increment)
BigInteger and BigDecimal.
This value must be an LValue.session - current sessionoperation - description of operation for error messagesincrement - true to increment, false to decrementLValue)EvalException - if this value is not an LValueEvalException - if this value is not numeric, BigInteger or BigDecimalValue negate(ParseSession session)
session - current sessionEvalException - if this value is not numericValue invert(ParseSession session)
session - current sessionEvalException - if this value is not numericValue multiply(ParseSession session, Value that)
session - current sessionthat - multiplicandEvalException - if value(s) are not numericValue divide(ParseSession session, Value that)
session - current sessionthat - divisorEvalException - if value(s) are not numericValue mod(ParseSession session, Value that)
session - current sessionthat - divisorEvalException - if value(s) are not numericValue add(ParseSession session, Value that)
session - current sessionthat - addendEvalException - if value(s) are not numeric or StringValue subtract(ParseSession session, Value that)
Set and NavigableSet difference.session - current sessionthat - subtrahendEvalException - if value(s) are not numeric or SetValue lshift(ParseSession session, Value arg)
session - current sessionarg - shift amountEvalException - if value(s) are not numericValue rshift(ParseSession session, Value arg)
session - current sessionarg - shift amountEvalException - if value(s) are not numericValue urshift(ParseSession session, Value arg)
session - current sessionarg - shift amountEvalException - if value(s) are not numericValue and(ParseSession session, Value that)
Set and NavigableSet intersection.session - current sessionthat - and valueEvalException - if value(s) are not numeric, boolean, or SetValue or(ParseSession session, Value that)
Set and NavigableSet union.session - current sessionthat - or valueEvalException - if value(s) are not numeric, boolean, or SetValue xor(ParseSession session, Value that)
Set and NavigableSet symmetric difference.session - current sessionthat - xor valueEvalException - if value(s) are not numeric or booleanValue compare(ParseSession session, Value that, int mask)
Comparable comparison.session - current sessionthat - value to compare tomask - bit mask with bits LT, GT, and/or EQEvalException - if value(s) are not numeric or mutually ComparableCopyright © 2017. All rights reserved.