T - type of elementspublic class TurnArray<T> extends Object implements Deque<T>
| Constructor and Description |
|---|
TurnArray()
Initialize with a size of 5.
|
TurnArray(int initSize)
Initialize with the given initial size.
|
TurnArray(int initSize,
int minSize)
Initialize with the given initial size.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> elements) |
void |
addFirst(T e) |
void |
addLast(T element) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c)
The implementation of this operation has not been optimised.
|
Iterator<T> |
descendingIterator() |
T |
element() |
T |
getFirst() |
T |
getLast() |
boolean |
isEmpty() |
boolean |
isFull() |
Iterator<T> |
iterator() |
boolean |
offer(T e) |
boolean |
offerFirst(T e) |
boolean |
offerLast(T e) |
T |
peek() |
T |
peekFirst() |
T |
peekLast() |
T |
poll() |
T |
pollFirst() |
T |
pollLast() |
T |
pop() |
void |
push(T e) |
T |
remove() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c)
The implementation of this operation has not been optimised.
|
List<T> |
removeAllNoOrder()
Remove all elements and return them, but the returned list is not ordered.
|
boolean |
removeAny(Object element)
remove this element, not necessarily the first or last occurrence.
|
T |
removeFirst() |
boolean |
removeFirstOccurrence(Object element) |
boolean |
removeInstance(T element)
Remove the given instance.
|
T |
removeLast() |
boolean |
removeLastOccurrence(Object element) |
boolean |
retainAll(Collection<?> c)
Not implemented.
|
int |
size() |
Object[] |
toArray() |
<U> U[] |
toArray(U[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streampublic TurnArray()
public TurnArray(int initSize)
public TurnArray(int initSize,
int minSize)
public boolean isFull()
public boolean addAll(Collection<? extends T> elements)
addAll in interface Collection<T>public T removeFirst()
removeFirst in interface Deque<T>public T removeLast()
removeLast in interface Deque<T>public boolean isEmpty()
isEmpty in interface Collection<T>public int size()
public void clear()
clear in interface Collection<T>public boolean add(T e)
public boolean offer(T e)
public boolean offerFirst(T e)
offerFirst in interface Deque<T>public T peek()
public T poll()
public T element()
public T remove()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>public boolean removeAny(Object element)
public boolean removeFirstOccurrence(Object element)
removeFirstOccurrence in interface Deque<T>public boolean removeLastOccurrence(Object element)
removeLastOccurrence in interface Deque<T>public boolean removeInstance(T element)
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>public Iterator<T> descendingIterator()
descendingIterator in interface Deque<T>public List<T> removeAllNoOrder()
public Object[] toArray()
toArray in interface Collection<T>public <U> U[] toArray(U[] a)
toArray in interface Collection<T>Copyright © 2019. All rights reserved.