generated.docs.javadoc.org.eclipse.dawnsci.analysis.tree.impl.NodeImpl.html Maven / Gradle / Ivy
NodeImpl (h5jan API)
org.eclipse.dawnsci.analysis.tree.impl
Class NodeImpl
- java.lang.Object
-
- org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
-
- All Implemented Interfaces:
- java.io.Serializable, Node
- Direct Known Subclasses:
- DataNodeImpl, GroupNodeImpl, SymbolicNodeImpl
public abstract class NodeImpl
extends java.lang.Object
implements Node, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected java.util.LinkedHashMap<java.lang.String,Attribute>
attributes
protected long
id
protected static java.lang.String
INDENT
protected static long
serialVersionUID
-
Constructor Summary
Constructors
Constructor and Description
NodeImpl(long oid)
Construct a node with given object ID
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
void
addAttribute(Attribute a)
Add given attribute to node
boolean
containsAttribute(java.lang.String name)
Attribute
getAttribute(java.lang.String name)
Get attribute of given name from node
java.util.Iterator<? extends Attribute>
getAttributeIterator()
java.util.Iterator<java.lang.String>
getAttributeNameIterator()
long
getID()
int
getNumberOfAttributes()
boolean
isDataNode()
boolean
isGroupNode()
boolean
isSymbolicNode()
java.lang.String
toString()
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
attributes
protected java.util.LinkedHashMap<java.lang.String,Attribute> attributes
-
INDENT
protected static final java.lang.String INDENT
- See Also:
- Constant Field Values
-
id
protected final long id
-
Constructor Detail
-
NodeImpl
public NodeImpl(long oid)
Construct a node with given object ID
- Parameters:
oid
- object ID
-
Method Detail
-
getNumberOfAttributes
public int getNumberOfAttributes()
- Specified by:
getNumberOfAttributes
in interface Node
- Returns:
- number of attributes on node
-
containsAttribute
public boolean containsAttribute(java.lang.String name)
- Specified by:
containsAttribute
in interface Node
- Returns:
- true if node contains attribute of given name
-
getAttribute
public Attribute getAttribute(java.lang.String name)
Description copied from interface: Node
Get attribute of given name from node
- Specified by:
getAttribute
in interface Node
- Returns:
- attribute (can be null if there is no attribute of given name)
-
addAttribute
public void addAttribute(Attribute a)
Description copied from interface: Node
Add given attribute to node
- Specified by:
addAttribute
in interface Node
-
getAttributeNameIterator
public java.util.Iterator<java.lang.String> getAttributeNameIterator()
- Specified by:
getAttributeNameIterator
in interface Node
- Returns:
- iterator over attribute names in node
-
getAttributeIterator
public java.util.Iterator<? extends Attribute> getAttributeIterator()
- Specified by:
getAttributeIterator
in interface Node
- Returns:
- iterator over attribute names in node
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
-
isGroupNode
public boolean isGroupNode()
- Specified by:
isGroupNode
in interface Node
- Returns:
true
if this node is a GroupNode
,
false
otherwise
-
isDataNode
public boolean isDataNode()
- Specified by:
isDataNode
in interface Node
- Returns:
true
if this node is a DataNode
,
false
otherwise
-
isSymbolicNode
public boolean isSymbolicNode()
- Specified by:
isSymbolicNode
in interface Node
- Returns:
true
if this node is a SymbolicNode
,
false
otherwise