net.sf.okapi.lib.xliff2.document

## Class UnitNode

- java.lang.Object
- - net.sf.okapi.lib.xliff2.document.UnitNode

- All Implemented Interfaces:
    IGroupOrUnitNode

      public class UnitNode
      extends java.lang.Object
      implements IGroupOrUnitNode

  Represents a unit node.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnitNode(Unit data)` Creates a new `UnitNode` with a given `Unit` resource.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Unit` | `get()` Gets the `Unit` associated with this unit node.
    `boolean` | `isUnit()` Indicates if this node is a UnitNode.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UnitNode

          public UnitNode(Unit data)

      Creates a new `UnitNode` with a given `Unit` resource.
      Parameters:
        `data` - the unit to set for this unit node (must not be null).

  - ### Method Detail

    - #### get

          public Unit get()

      Gets the `Unit` associated with this unit node.
      Returns:
        the unit object associated with this unit node.

    - #### isUnit

          public boolean isUnit()

      Description copied from interface: `IGroupOrUnitNode`
      Indicates if this node is a UnitNode.
      Specified by:
        `isUnit` in interface `IGroupOrUnitNode`
      Returns:
        true if it is a UnitNode, false if it is a GroupNode.