public abstract class AbstractValue extends Object implements Value
Modifier | Constructor and Description |
---|---|
protected |
AbstractValue() |
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.
|
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.
|
public Class<?> getType(ParseSession session)
Value
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.
public Object checkNotNull(ParseSession session, String operation)
Value
checkNotNull
in interface Value
session
- current sessionoperation
- description of operation for error messagespublic boolean checkBoolean(ParseSession session, String operation)
Value
checkBoolean
in interface Value
session
- current sessionoperation
- description of operation for error messagespublic Number checkNumeric(ParseSession session, String operation)
Value
Number
), and return it.checkNumeric
in interface Value
session
- current sessionoperation
- description of operation for error messagespublic int checkIntegral(ParseSession session, String operation)
Value
checkIntegral
in interface Value
session
- current sessionoperation
- description of operation for error messagespublic <T> T checkType(ParseSession session, String operation, Class<T> type)
Value
public Value xxcrement(ParseSession session, String operation, boolean increment)
Value
BigInteger
and BigDecimal
.
This value must be an LValue
.public Value negate(ParseSession session)
Value
public Value invert(ParseSession session)
Value
public Value multiply(ParseSession session, Value that)
Value
public Value divide(ParseSession session, Value that)
Value
public Value mod(ParseSession session, Value that)
Value
public Value add(ParseSession session, Value that)
Value
public Value subtract(ParseSession session, Value that)
Value
Set
and NavigableSet
difference.public Value lshift(ParseSession session, Value arg)
Value
public Value rshift(ParseSession session, Value arg)
Value
public Value urshift(ParseSession session, Value arg)
Value
public Value and(ParseSession session, Value that)
Value
Set
and NavigableSet
intersection.public Value or(ParseSession session, Value that)
Value
Set
and NavigableSet
union.public Value xor(ParseSession session, Value that)
Value
Set
and NavigableSet
symmetric difference.public Value compare(ParseSession session, Value that, int mask)
Value
Comparable
comparison.Copyright © 2019. All rights reserved.