Package google.registry.util
Class CircularList<T>
java.lang.Object
google.registry.util.CircularList<T>
- Type Parameters:
T
- - Element type stored in theCircularList
- Direct Known Subclasses:
ProbingSequence
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
CircularList.AbstractBuilder<T,
C extends CircularList<T>> AsCircularList
represents one component of the entire list, it requires a builder to create the full list.static class
Default Builder to create a standard instance of aCircularList
. -
Constructor Summary
ModifierConstructorDescriptionprotected
CircularList
(T value) Standard constructor forCircularList
that initializes its storedvalue
. -
Method Summary
Modifier and TypeMethodDescriptionget()
Standard get method to retrievevalue
.next()
Standard method to obtainnext
node in list.void
setNext
(CircularList<T> next) Setter method only used in builder to point one node to the next.
-
Constructor Details
-
CircularList
Standard constructor forCircularList
that initializes its storedvalue
.
-
-
Method Details
-
get
Standard get method to retrievevalue
. -
next
Standard method to obtainnext
node in list. -
setNext
Setter method only used in builder to point one node to the next.
-