Class AvlUtil.AvlIterableList

java.lang.Object
org.apache.hadoop.hbase.util.AvlUtil.AvlIterableList
Enclosing class:
AvlUtil

@Private public static class AvlUtil.AvlIterableList extends Object
Helper class that allows to create and manipulate a linked list of AvlLinkedNodes
  • Constructor Details

  • Method Details

    • readNext

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode readNext(TNode node)
      Return the successor of the current node
      Parameters:
      node - the current node
      Returns:
      the successor of the current node
    • readPrev

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode readPrev(TNode node)
      Return the predecessor of the current node
      Parameters:
      node - the current node
      Returns:
      the predecessor of the current node
    • prepend

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode prepend(TNode head, TNode node)
      Prepend a node to the tree
      Parameters:
      head - the head of the linked list
      node - the node to add to the front of the list
      Returns:
      the new head of the list
    • append

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode append(TNode head, TNode node)
      Append a node to the tree
      Parameters:
      head - the head of the linked list
      node - the node to add to the tail of the list
      Returns:
      the new head of the list
    • appendList

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode appendList(TNode head, TNode otherHead)
      Append a list of nodes to the tree
      Parameters:
      head - the head of the current linked list
      otherHead - the head of the list to append to the current list
      Returns:
      the new head of the current list
    • remove

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode remove(TNode head, TNode node)
      Remove a node from the tree
      Parameters:
      head - the head of the linked list
      node - the node to remove from the list
      Returns:
      the new head of the list
    • prepend

      public static <TNode extends AvlUtil.AvlLinkedNode> TNode prepend(TNode head, TNode base, TNode node)
      Prepend a node to the tree before a specific node
      Parameters:
      head - the head of the linked list
      base - the node which we want to add the node before it
      node - the node which we want to add it before the base node
    • isLinked

      public static <TNode extends AvlUtil.AvlLinkedNode> boolean isLinked(TNode node)
      Return true if the node is linked to a list, false otherwise