## 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

Constructor Summary
`NodeImpl(Integer id)` Construction from id.
`NodeImpl(Integer id, Long offset)` Construction from id and offset.

Method Summary
`int` `compareTo(Object o)` Ordering
`Integer` `getId()` Returns the Id of the Node.
`Long` `getOffset()` Offset (will be null when the node is not anchored)
`String` `toString()` String representation

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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 node
    `offset` - the (temporal) offset of the Node; Should be null for non-anchored nodes.

Method Detail

### 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`