public class DataNode<T> extends java.lang.Object implements UserDataHolderEx, java.io.Serializable
| Constructor and Description | 
|---|
DataNode(Key<T> key,
        T data,
        DataNode<?> parent)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addChild(DataNode<?> child)  | 
void | 
clear(boolean removeFromGraph)  | 
<T> DataNode<T> | 
createChild(Key<T> key,
           T data)  | 
boolean | 
equals(java.lang.Object o)  | 
java.util.Collection<DataNode<?>> | 
getChildren()  | 
<T> T | 
getCopyableUserData(Key<T> key)  | 
T | 
getData()  | 
<T> T | 
getData(Key<T> key)
Allows to retrieve data stored for the given key at the current node or any of its parents. 
 | 
<T> DataNode<T> | 
getDataNode(Key<T> key)  | 
Key<T> | 
getKey()  | 
DataNode<?> | 
getParent()  | 
<P> DataNode<P> | 
getParent(java.lang.Class<P> dataClass)  | 
<U> U | 
getUserData(Key<U> key)  | 
DataNode<T> | 
graphCopy()  | 
int | 
hashCode()  | 
boolean | 
isIgnored()  | 
boolean | 
isReady()  | 
DataNode<T> | 
nodeCopy()  | 
static <T> DataNode<T> | 
nodeCopy(DataNode<T> dataNode)  | 
<T> void | 
putCopyableUserData(Key<T> key,
                   T value)  | 
<U> void | 
putUserData(Key<U> key,
           U value)
Add a new user data value to this object. 
 | 
<D> D | 
putUserDataIfAbsent(Key<D> key,
                   D value)  | 
<U> void | 
removeUserData(Key<U> key)  | 
<D> boolean | 
replace(Key<D> key,
       D oldValue,
       D newValue)
Replaces (atomically) old value in the map with the new one 
 | 
void | 
setIgnored(boolean ignored)  | 
java.lang.String | 
toString()  | 
boolean | 
validateData()  | 
void | 
visit(java.util.function.Consumer<? super DataNode<?>> consumer)  | 
void | 
visitData(java.util.function.Function visitor)
Allows to replace or modify data. 
 | 
public boolean isReady()
public DataNode<?> getParent()
public T getData()
public boolean isIgnored()
public void setIgnored(boolean ignored)
public void visitData(java.util.function.Function visitor)
visitor - visitor. Must accept argument of type T and return value of type Tpublic <T> T getData(Key<T> key)
D - target data typekey - target data's keypublic <P> DataNode<P> getParent(java.lang.Class<P> dataClass)
public void addChild(DataNode<?> child)
public java.util.Collection<DataNode<?>> getChildren()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void clear(boolean removeFromGraph)
public <U> U getUserData(Key<U> key)
getUserData in interface UserDataHolderpublic <U> void putUserData(Key<U> key, U value)
UserDataHolderputUserData in interface UserDataHolderpublic <U> void removeUserData(Key<U> key)
public <D> D putUserDataIfAbsent(Key<D> key, D value)
putUserDataIfAbsent in interface UserDataHolderExpublic <D> boolean replace(Key<D> key, D oldValue, D newValue)
UserDataHolderExreplace in interface UserDataHolderExConcurrentMap.replace(Object, Object, Object)public <T> void putCopyableUserData(Key<T> key, T value)
public <T> T getCopyableUserData(Key<T> key)
public boolean validateData()
public final void visit(java.util.function.Consumer<? super DataNode<?>> consumer)