|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacets.util.Tracer
facets.util.StatefulCore
facets.util.datatree.TypedNode<java.lang.String>
facets.util.datatree.DataNode
public class DataNode
Mutable, persistable TypedNode.
DataNode extends its superclass by
contents(),
TypedNode.children() and TypedNode.values()
contents()
and of methods from Stateful
TypedNode.values() with String, so allowing
DataNode trees to be persisted textually.
| Field Summary |
|---|
| Fields inherited from class facets.util.datatree.TypedNode |
|---|
NULL_NODE, UNTITLED |
| Constructor Summary | |
|---|---|
DataNode(java.lang.String type,
java.lang.String title)
|
|
DataNode(java.lang.String type,
java.lang.String title,
java.lang.Object[] contents)
|
|
| Method Summary | |
|---|---|
java.lang.Object[] |
contents()
Useful re-implementation. |
Stateful |
copyState()
Implements interface method. |
void |
setChildren(TypedNode... children)
Removes any existing children, appends those passed to any non- TypedNode contents. |
void |
setContents(java.lang.Object... contents)
Replaces any existing contents. |
void |
setState(java.lang.Object src)
Valid re-implementation. |
void |
setValues(java.lang.Object... values)
Removes any existing values, prepending those passed to any TypedNode contents. |
boolean |
stateEquals(Stateful other)
Valid re-implementation. |
java.lang.String |
toString()
Re-implementation wrapping Debug.info(Object). |
protected java.lang.String |
valueString(java.lang.Object value)
Stringifies values to comply with TypedNode.values(). |
| Methods inherited from class facets.util.datatree.TypedNode |
|---|
children, identity, parent, setParent, setValidType, type, values |
| Methods inherited from class facets.util.StatefulCore |
|---|
setTitle, stateStamp, title, updateStateStamp |
| Methods inherited from class facets.util.Tracer |
|---|
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataNode(java.lang.String type,
java.lang.String title)
public DataNode(java.lang.String type,
java.lang.String title,
java.lang.Object[] contents)
| Method Detail |
|---|
public void setContents(java.lang.Object... contents)
contents must conform to the contract for contents().
public final void setChildren(TypedNode... children)
TypedNode contents.
children must conform to the contract for TypedNode.children().
public final void setValues(java.lang.Object... values)
TypedNode contents.
values - must
valueString(Object)
TypedNode.values()
String values may be key pairs in the format key=value where value is stringifiable by the implementation
protected java.lang.String valueString(java.lang.Object value)
TypedNode.values().
value - passed from setValues(Object...)
String for return by TypedNode.values()public java.lang.Object[] contents()
contents in class TypedNode<java.lang.String>setContents(Object...)public Stateful copyState()
Returns a deep copy of the node and its contents() with
TypedNode.type() and StatefulCore.title()
Strings returned by TypedNode.values()
copyState()
copyState in interface StatefulcopyState in class TypedNode<java.lang.String>public void setState(java.lang.Object src)
setState in interface StatefulsetState in class TypedNode<java.lang.String>src - must be a TypedNode of the same TypedNode.type()public final boolean stateEquals(Stateful other)
stateEquals in interface StatefulstateEquals in class StatefulCoreother - must be DataNode
true if the two trees are byte-identical
apart from TypedNode.identity()public java.lang.String toString()
StatefulCoreDebug.info(Object).
toString in class TypedNode<java.lang.String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||