Modifier and Type | Class and Description |
---|---|
class |
CircularList.CircularListIterator |
Constructor and Description |
---|
CircularList() |
Modifier and Type | Method and Description |
---|---|
T |
advance()
Advance the head of the circular list forward to the next element.
|
T |
advanceToElement(Predicate<T> predicate)
Advances through the circular list returning the first element for which the predicate evaluates to true.
|
void |
forEach(Consumer<? super T> action) |
void |
insertAtHead(T element)
Insert a new element at the head of the circular list.
|
void |
insertAtTail(T element)
Insert an element at the tail of the circular list (the position just previous to the head).
|
Iterator<T> |
iterator() |
T |
peek()
Get the element at the head of the list without removing it.
|
T |
pop()
Take an element off the head of the list, removing it from the list.
|
boolean |
remove(T obj)
Remove an item from this circular list.
|
Spliterator<T> |
spliterator() |
public Spliterator<T> spliterator()
spliterator
in interface Iterable<T>
public void insertAtTail(T element)
public void insertAtHead(T element)
public T peek()
public T pop()
public T advance()
public T advanceToElement(Predicate<T> predicate)
public boolean remove(T obj)
Copyright © 2019. All rights reserved.