StateAware<Value>
, Value
, Serializable
, Comparable<Value>
public class DollarNull extends AbstractDollar
Constructor | Description |
---|---|
DollarNull(@NotNull com.google.common.collect.ImmutableList<Throwable> errors,
@NotNull Type type) |
|
DollarNull(@NotNull Type type) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Value |
$abs() |
Computes the absolute value for this object.
|
@NotNull Value |
$append(@NotNull Value value) |
|
@NotNull Value |
$as(@NotNull Type type) |
Cast this object to the
Type specified. |
@NotNull Value |
$containsKey(@NotNull Value value) |
|
@NotNull Value |
$containsValue(@NotNull Value value) |
|
@NotNull Value |
$divide(@NotNull Value rhs) |
Divide the value.
|
@NotNull Value |
$get(@NotNull Value key) |
|
@NotNull Value |
$has(@NotNull Value key) |
Returns true if this object has the supplied key.
|
@NotNull Value |
$insert(@NotNull Value value,
int position) |
|
@NotNull Value |
$minus(@NotNull Value rhs) |
Deducts from Value, for toStrings this means remove all occurrence of and for collections it means remove the value
from the collection.
|
@NotNull Value |
$modulus(@NotNull Value rhs) |
Returns the remainder after a division.
|
@NotNull Value |
$multiply(@NotNull Value v) |
$ multiply.
|
@NotNull Value |
$negate() |
Negate the value, for lists, toStrings and maps this means reversing the elements.
|
@NotNull Value |
$plus(@NotNull Value rhs) |
Returns a new
Value with this value added to it. |
@NotNull Value |
$prepend(@NotNull Value value) |
|
@NotNull Value |
$remove(@NotNull Value value) |
Return a new version of this object with the supplied value removed.
|
@NotNull Value |
$removeByKey(@NotNull String value) |
Remove by key.
|
@NotNull Value |
$set(@NotNull Value key,
@NotNull Object value) |
If this type supports the setting of Key/Value pairs this will set the supplied key value pair on a copy of this
object.
|
@NotNull Value |
$size() |
|
@NotNull Type |
$type() |
Returns the definitive type of this object, this will trigger execution in dynamic values.
|
boolean |
collection() |
Is collection.
|
int |
compareTo(@NotNull Value o) |
|
boolean |
equals(Object other) |
|
int |
hashCode() |
|
boolean |
is(@NotNull Type... types) |
Returns true if this object is of any of the supplied types.
|
boolean |
isBoolean() |
Is boolean.
|
boolean |
isFalse() |
Is false.
|
boolean |
isNull() |
Returns true if this is a null value, the null value is not the same as a void value.
|
boolean |
isTrue() |
Is true.
|
boolean |
isVoid() |
Is this object a void object? Void objects are a similar concept to nil in Objective-C, any operation on them
results in a void value.
|
boolean |
neitherTrueNorFalse() |
Is neither true nor false.
|
@NotNull Value |
remove(@NotNull Object value) |
Convenience version of
Value.$remove(Value) for the Java API. |
int |
sign() |
Sign int.
|
@org.jetbrains.annotations.NotNull int |
size() |
|
@NotNull String |
toDollarScript() |
Convert this value to a DollarScript compatible string value.
|
@NotNull String |
toHumanString() |
Converts this value to a human readable string.
|
int |
toInteger() |
toInteger integer.
|
<K extends Comparable<K>,V> |
toJavaMap() |
Returns this object as a set of nested maps the values are completely unwrapped and don't contain 'Value' objects.
|
<R> R |
toJavaObject() |
Returns the underlying storage value for this type.
|
@NotNull String |
toJsonString() |
Convert this to a Dollar
JsonObject |
@NotNull com.google.common.collect.ImmutableList<Object> |
toList() |
Converts this to a list of value objects such as you would get from $().
|
@NotNull Number |
toNumber() |
toNumber number.
|
com.google.common.collect.ImmutableList<String> |
toStrings() |
Returns this object as a list of string values or null if this is not applicable.
|
@NotNull com.google.common.collect.ImmutableList<Value> |
toVarList() |
Converts this to a list of vars.
|
@NotNull com.google.common.collect.ImmutableMap<Value,Value> |
toVarMap() |
$ map.
|
@NotNull String |
toYaml() |
$ map.
|
boolean |
truthy() |
Is truthy, i.e.
|
$all, $avg, $choose, $constrain, $copy, $copy, $create, $default, $destroy, $drain, $each, $fix, $fix, $fixDeep, $max, $min, $notify, $pause, $product, $publish, $read, $reverse, $signal, $sort, $start, $state, $stop, $sum, $unique, $unpause, $unwrap, $write, constraintLabel, debug, debug, debugf, decimal, dynamic, error, error, error, errorf, getStateMachine, info, info, infof, integer, list, map, meta, meta, metaAttribute, metaAttribute, number, pair, predictType, queue, singleValue, string, toDouble, toLong, toStream, toString, uri
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
$, $cancel, $contains, $dec, $dispatch, $equals, $fixDeep, $give, $has, $inc, $isEmpty, $list, $listen, $listen, $map, $mimeType, $notEquals, $pairKey, $pairValue, $peek, $poll, $pop, $push, $read, $S, $serialized, $split, $stream, $subscribe, $subscribe, $write, equalsString, err, infinite, isEmpty, jsonArray, negative, out, positive, range, source, stream, toJsonObject, toJsonType, type, zero
public DollarNull(@NotNull @NotNull com.google.common.collect.ImmutableList<Throwable> errors, @NotNull @NotNull Type type)
public DollarNull(@NotNull @NotNull Type type)
@NotNull public @NotNull Value $abs()
Value
@NotNull public @NotNull Value $as(@NotNull @NotNull Type type)
Value
Type
specified. If the object cannot be converted it will fail with ErrorType.INVALID_CAST
*type
- the type to cast to@NotNull public @NotNull Value $divide(@NotNull @NotNull Value rhs)
Value
rhs
- the value to divide by@NotNull public @NotNull Value $has(@NotNull @NotNull Value key)
Value
key
- the key@NotNull public @NotNull Value $minus(@NotNull @NotNull Value rhs)
Value
rhs
- the value to deduct from this@NotNull public @NotNull Value $modulus(@NotNull @NotNull Value rhs)
Value
rhs
- the value to divide by@NotNull public @NotNull Value $multiply(@NotNull @NotNull Value v)
Value
v
- the v@NotNull public @NotNull Value $negate()
Value
@NotNull public @NotNull Value $plus(@NotNull @NotNull Value rhs)
Value
Value
with this value added to it. Like Value.$minus(Value)
the actual behaviour varies with
types. So for toStrings this is concatenation for collections it is adding a new element.rhs
- the value to add@NotNull public @NotNull Value $remove(@NotNull @NotNull Value value)
Value
value
- the value to remove.@NotNull public @NotNull Value $removeByKey(@NotNull @NotNull String value)
Value
value
- the key of the key/value pair to remove@NotNull public @NotNull Value $set(@NotNull @NotNull Value key, @NotNull @NotNull Object value)
Value
key
- a String key for the value to be stored in this value.value
- the Value
to add.@NotNull public @NotNull Value $size()
@NotNull public @NotNull Type $type()
Value
public boolean collection()
Value
public boolean is(@NotNull @NotNull Type... types)
Value
types
- a list of typespublic boolean isBoolean()
Value
public boolean isFalse()
Value
public boolean isNull()
Value
public boolean isTrue()
Value
public boolean isVoid()
Value
public boolean neitherTrueNorFalse()
Value
@NotNull public @NotNull Value remove(@NotNull @NotNull Object value)
Value
Value.$remove(Value)
for the Java API.value
- the value to be removed.public int sign()
Value
@NotNull public @org.jetbrains.annotations.NotNull int size()
@NotNull public @NotNull String toDollarScript()
Value
@NotNull public @NotNull String toHumanString()
Value
public int toInteger()
Value
@NotNull public <K extends Comparable<K>,V> @NotNull com.google.common.collect.ImmutableMap<K,V> toJavaMap()
Value
K
- the type parameterV
- the type parameter@Nullable public <R> R toJavaObject()
Value
@NotNull public @NotNull String toJsonString()
Value
JsonObject
JsonObject
@NotNull public @NotNull com.google.common.collect.ImmutableList<Object> toList()
Value
@NotNull public @NotNull Number toNumber()
Value
public com.google.common.collect.ImmutableList<String> toStrings()
Value
@NotNull public @NotNull com.google.common.collect.ImmutableList<Value> toVarList()
Value
@NotNull public @NotNull com.google.common.collect.ImmutableMap<Value,Value> toVarMap()
Value
@NotNull public @NotNull String toYaml()
Value
public boolean truthy()
Value
public int compareTo(@NotNull @NotNull Value o)
public int hashCode()
hashCode
in class AbstractDollar
public boolean equals(Object other)
equals
in class AbstractDollar
Copyright © 2017. All rights reserved.