|
||||||||||
| 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<V>
public abstract class TypedNode<V>
Defines simple tree node.
A TypedNode has
contents() comprising any combination of TypedNode children()
and values() of the parameter type.
type() which corresponds to an XML element name and a
StatefulCore.title() defining what is in effect a primary attribute.
TypedNode is declared abstract as several key methods
are implemented as convenience stubs, some invalid.
| Field Summary | |
|---|---|
static TypedNode |
NULL_NODE
|
static java.lang.String |
UNTITLED
For use when no other value is appropriate for return by StatefulCore.title(). |
| Constructor Summary | |
|---|---|
TypedNode(java.lang.Class valueType,
java.lang.String type,
java.lang.String title)
Unique constructor. |
|
| Method Summary | |
|---|---|
TypedNode[] |
children()
The node's TypedNode contents. |
java.lang.Object[] |
contents()
Return the node's children and values. |
Stateful |
copyState()
Invalid stub. |
java.lang.Object |
identity()
Return an object that is as far as possible unique for the implementation. |
TypedNode |
parent()
Returns the node's parent. |
void |
setParent(TypedNode parent)
Set the node to be returned by parent(). |
void |
setState(java.lang.Object src)
Invalid stub. |
void |
setValidType(java.lang.String type)
Validates and sets the string to be returned by type(). |
java.lang.String |
toString()
Re-implementation wrapping Debug.info(Object). |
java.lang.String |
type()
String suggestive of nature of content tree. |
V[] |
values()
The node's non- TypedNode contents. |
| Methods inherited from class facets.util.StatefulCore |
|---|
setTitle, stateEquals, 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 |
| Field Detail |
|---|
public static final TypedNode NULL_NODE
public static final java.lang.String UNTITLED
StatefulCore.title().
| Constructor Detail |
|---|
public TypedNode(java.lang.Class valueType,
java.lang.String type,
java.lang.String title)
valueType - enables return from values() matching the type parameter;
only implemented for Object and String;
cannot be TypedNode itselftype - passed to setValidType(String)
for return by type()title - passed to StatefulCore| Method Detail |
|---|
public final void setValidType(java.lang.String type)
type().
type - must be usable as XML namepublic final java.lang.String type()
setValidType(String)public final TypedNode[] children()
TypedNode contents.
Complains at null members.
public final V[] values()
TypedNode contents.
null memberspublic java.lang.Object[] contents()
Called (via checks for null) by children()
and values();
returned array must not be null nor contain any
null members; order may be defined in subclasses.
public TypedNode parent()
If none set, returns null without complaint.
public void setParent(TypedNode parent)
parent().
parent - may be null (signifying instance is root of its tree)public Stateful copyState()
copyState in interface StatefulcopyState in class StatefulCorepublic void setState(java.lang.Object src)
setState in interface StatefulsetState in class StatefulCoresrc - must be non-null and interpretable by the implementation
as state information; it will usually be another instance of the
Stateful's class.public java.lang.Object identity()
IdentifiedThis will usually be a class instance counter.
identity in interface Identifiedpublic java.lang.String toString()
StatefulCoreDebug.info(Object).
toString in class StatefulCore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||