Package de.gebit.integrity.remoting.entities.setlist

## Class SetListUtil

- java.lang.Object
- - de.gebit.integrity.remoting.entities.setlist.SetListUtil

-     public final class SetListUtil
      extends Object

  This utility class collects several methods used to explore `SetList`s. Quite some of these could well be implemented in the `SetListEntry` class, but they've been deliberately implemented in a separate utility class to minimize code changes in the set list classes and thus minimize the risk of introducing serialization incompatibilities.
  Author:
    Rene Schneider - initial API and implementation

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SetListEntry` | `getSetListEntryChild​(SetListEntry anEntry, SetList aSetList, int aChildIndex)` | Returns the actual child entry at a specified position within the children of a specified `SetListEntry`.
    `static int` | `getSetListEntryChildCount​(SetListEntry anEntry)` | Returns the number of children that a specified `SetListEntry` has.
    `static List<Integer>` | `getSetListEntryChildReferences​(SetListEntry anEntry)` | Returns a list of child node references belonging to a specified `SetListEntry`.
    `static List<SetListEntry>` | `getSetListEntryChilds​(SetListEntry anEntry, SetList aSetList)` | Returns the actual child entries of the given `SetListEntry`.

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

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

- - ### Method Detail

    - #### getSetListEntryChildCount

          public static int getSetListEntryChildCount​(SetListEntry anEntry)

      Returns the number of children that a specified `SetListEntry` has. This includes only "children" to be displayed as child nodes in the tree.
      Parameters:
        `anEntry` - the entry
      Returns:
        the number of child nodes

    - #### getSetListEntryChildReferences

          public static List<Integer> getSetListEntryChildReferences​(SetListEntry anEntry)

      Returns a list of child node references belonging to a specified `SetListEntry`. This only includes such children that should be displayed in the tree.
      Parameters:
        `anEntry` - the entry
      Returns:
        a list of child references (entry IDs), or null if this is not applicable.

    - #### getSetListEntryChild

          public static SetListEntry getSetListEntryChild​(SetListEntry anEntry,
                                                          SetList aSetList,
                                                          int aChildIndex)

      Returns the actual child entry at a specified position within the children of a specified `SetListEntry`.
      Parameters:
        `anEntry` - the entry
        `aSetList` - the setlist that the entry belongs to
        `aChildIndex` - the index of the child to get
      Returns:
        the child entry, or null if there is none

    - #### getSetListEntryChilds

          public static List<SetListEntry> getSetListEntryChilds​(SetListEntry anEntry,
                                                                 SetList aSetList)

      Returns the actual child entries of the given `SetListEntry`.
      Parameters:
        `anEntry` - the entry
        `aSetList` - the setlist that the entry belongs to
      Returns:
        the list of childs, or null if the entry does not refer to any childs due to its type