public class State extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
State.ListDiff
A diff for an array or
List . |
static class |
State.StateDiff
A diff for a
State . |
Modifier and Type | Field and Description |
---|---|
static State |
EMPTY |
static org.nuxeo.ecm.core.storage.State.Nop |
NOP
Denotes no change to an element.
|
Constructor and Description |
---|
State()
Constructor with default capacity.
|
State(boolean threadSafe)
Constructor with default capacity, optionally thread-safe.
|
State(int size)
Constructor for a given default size.
|
State(int size,
boolean threadSafe)
Constructor for a given default size, optionally thread-safe.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key)
Checks if there is a mapping for the given key.
|
Set<Map.Entry<String,Serializable>> |
entrySet()
Gets the entry set.
|
Serializable |
get(Object key)
Gets a value for a key, or
null if the key is not present. |
boolean |
isEmpty()
Checks if the state is empty.
|
Set<String> |
keySet()
Gets the key set.
|
void |
put(String key,
Serializable value)
Sets a key/value, dealing with deltas.
|
void |
putInternal(String key,
Serializable value)
Sets a key/value.
|
Serializable |
remove(Object key)
Removes the mapping for a key.
|
int |
size()
Gets the number of elements.
|
String |
toString()
Overridden to display Calendars and arrays better, and truncate long strings and arrays.
|
public static final State EMPTY
public static final org.nuxeo.ecm.core.storage.State.Nop NOP
public State()
public State(boolean threadSafe)
threadSafe
- if true
, then a ConcurrentHashMap
is usedpublic State(int size)
public State(int size, boolean threadSafe)
threadSafe
- if true
, then a ConcurrentHashMap
is usedpublic int size()
public boolean isEmpty()
public Serializable get(Object key)
null
if the key is not present.public void putInternal(String key, Serializable value)
public void put(String key, Serializable value)
public Serializable remove(Object key)
null
if there was no mapping for the keypublic boolean containsKey(Object key)
public Set<Map.Entry<String,Serializable>> entrySet()
Copyright © 2015 Nuxeo SA. All rights reserved.