Class CircularList<T>

java.lang.Object
google.registry.util.CircularList<T>
Type Parameters:
T - - Element type stored in the CircularList
Direct Known Subclasses:
ProbingSequence

public class CircularList<T> extends Object
Class that stores value <T>, and points in circle to other CircularList objects.

In its construction, we create a sequence of CircularList objects, each storing an instance of T. They each point to each other in a circular manner, such that we can perform circular iteration on the elements. Once finished building, we return this first CircularList object in the sequence.

  • Constructor Details

    • CircularList

      protected CircularList(T value)
      Standard constructor for CircularList that initializes its stored value.
  • Method Details

    • get

      public T get()
      Standard get method to retrieve value.
    • next

      public CircularList<T> next()
      Standard method to obtain next node in list.
    • setNext

      public void setNext(CircularList<T> next)
      Setter method only used in builder to point one node to the next.