gate.annotation
Class NodeImpl
java.lang.Object
|
+--gate.annotation.NodeImpl
- All Implemented Interfaces:
- Comparable, IdBearer, Node, Serializable
- public class NodeImpl
- extends Object
- implements Node, Comparable
Provides an implementation for the interface gate.Node.
- See Also:
- Serialized Form
NodeImpl
public NodeImpl(Integer id)
- Construction from id. Creates an unrooted node.
NodeImpl
public NodeImpl(Integer id,
Long offset)
- Construction from id and offset.
- Parameters:
id
- the Id of the new nodeoffset
- the (temporal) offset of the Node; Should be null
for non-anchored nodes.
getId
public Integer getId()
- Returns the Id of the Node.
- Specified by:
getId
in interface IdBearer
getOffset
public Long getOffset()
- Offset (will be null when the node is not anchored)
- Specified by:
getOffset
in interface Node
toString
public String toString()
- String representation
- Overrides:
toString
in class Object
compareTo
public int compareTo(Object o)
throws ClassCastException
- Ordering
- Specified by:
compareTo
in interface Comparable