public interface SymbolMap extends Iterable<Map.Entry<Symbol<?>,Object>>, HasObjectHelper
Modifier and Type | Interface and Description |
---|---|
static interface |
SymbolMap.Fluid
A SymbolMap that is mutable and an entity object.
|
static interface |
SymbolMap.Solid
A SymbolMap that is immutable and a value object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Symbol<?> symbol)
Is the symbol a key in the SymbolMap?
|
SymbolMap.Fluid |
fluid()
Get a SymbolMap.Fluid copy.
|
<Value> Value |
get(Symbol<Value> symbol)
Get the value associated with a symbol.
|
<Value> Value |
getDefault(Symbol<Value> symbol,
Value defaultValue)
Get the value associated with a symbol, or the defaultValue if it is missing, or the
defaultValue if the value is null.
|
<Value> Value |
getDefault(Symbol<Value> symbol,
Value defaultValue,
boolean adaptNull)
Get the value associated with a symbol, or the defaultValue if it is missing, or the
defaultValue if its null and adaptNull = true.
|
<Value> Value |
getNullable(Symbol<Value> symbol)
Get the value associated with a symbol, or null if it is missing.
|
<Value> com.google.common.base.Optional<Value> |
getOptional(Symbol<Value> symbol)
Get the value associated with a symbol, or Optional.absent if it is missing, or Optional.absent
if the value is null.
|
<Value> com.google.common.base.Optional<Value> |
getOptional(Symbol<Value> symbol,
boolean adaptNull)
Get the value associated with a symbol, or Optional.absent if it is missing, or Optional.absent
if the value is null and adaptTrue = true.
|
SymbolMap.Solid |
solid()
Get a SymbolMap.Solid copy.
|
Map<Symbol<?>,Object> |
stateCopy()
Get a Map copy of the state.
|
com.google.common.collect.ImmutableSet<Symbol<?>> |
symbols()
The set of contained symbols.
|
objectHelper
<Value> Value get(Symbol<Value> symbol)
<Value> Value getDefault(Symbol<Value> symbol, Value defaultValue)
<Value> Value getDefault(Symbol<Value> symbol, Value defaultValue, boolean adaptNull)
<Value> com.google.common.base.Optional<Value> getOptional(Symbol<Value> symbol)
<Value> com.google.common.base.Optional<Value> getOptional(Symbol<Value> symbol, boolean adaptNull)
<Value> Value getNullable(Symbol<Value> symbol)
boolean contains(Symbol<?> symbol)
com.google.common.collect.ImmutableSet<Symbol<?>> symbols()
SymbolMap.Fluid fluid()
SymbolMap.Solid solid()
Copyright © 2014. All rights reserved.