org.marketcetera.util.collections
Class UnmodifiableDeque<T>
java.lang.Object
org.marketcetera.util.collections.UnmodifiableDeque<T>
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, Deque<T>, Queue<T>
@NotThreadSafe
public class UnmodifiableDeque<T>
- extends Object
- implements Deque<T>
Provides a Deque implementation that cannot be modified.
This class is not thread-safe: if thread-safety is required external
synchronization is necessary.
- Since:
- 2.1.4
- Version:
- $Id: UnmodifiableDeque.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- Colin DuPlantis
UnmodifiableDeque
public UnmodifiableDeque(Deque<T> inCollection)
- Create a new UnmodifiableDeque instance.
- Parameters:
inCollection - a Deque<T> value
addAll
public boolean addAll(Collection<? extends T> inC)
- Specified by:
addAll in interface Collection<T>
clear
public void clear()
- Specified by:
clear in interface Collection<T>
containsAll
public boolean containsAll(Collection<?> inC)
- Specified by:
containsAll in interface Collection<T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection<T>
removeAll
public boolean removeAll(Collection<?> inC)
- Specified by:
removeAll in interface Collection<T>
retainAll
public boolean retainAll(Collection<?> inC)
- Specified by:
retainAll in interface Collection<T>
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection<T>
toArray
public <C> C[] toArray(C[] inA)
- Specified by:
toArray in interface Collection<T>
add
public boolean add(T inE)
- Specified by:
add in interface Collection<T>- Specified by:
add in interface Deque<T>- Specified by:
add in interface Queue<T>
addFirst
public void addFirst(T inE)
- Specified by:
addFirst in interface Deque<T>
addLast
public void addLast(T inE)
- Specified by:
addLast in interface Deque<T>
contains
public boolean contains(Object inO)
- Specified by:
contains in interface Collection<T>- Specified by:
contains in interface Deque<T>
descendingIterator
public Iterator<T> descendingIterator()
- Specified by:
descendingIterator in interface Deque<T>
element
public T element()
- Specified by:
element in interface Deque<T>- Specified by:
element in interface Queue<T>
getFirst
public T getFirst()
- Specified by:
getFirst in interface Deque<T>
getLast
public T getLast()
- Specified by:
getLast in interface Deque<T>
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>- Specified by:
iterator in interface Collection<T>- Specified by:
iterator in interface Deque<T>
offer
public boolean offer(T inE)
- Specified by:
offer in interface Deque<T>- Specified by:
offer in interface Queue<T>
offerFirst
public boolean offerFirst(T inE)
- Specified by:
offerFirst in interface Deque<T>
offerLast
public boolean offerLast(T inE)
- Specified by:
offerLast in interface Deque<T>
peek
public T peek()
- Specified by:
peek in interface Deque<T>- Specified by:
peek in interface Queue<T>
peekFirst
public T peekFirst()
- Specified by:
peekFirst in interface Deque<T>
peekLast
public T peekLast()
- Specified by:
peekLast in interface Deque<T>
poll
public T poll()
- Specified by:
poll in interface Deque<T>- Specified by:
poll in interface Queue<T>
pollFirst
public T pollFirst()
- Specified by:
pollFirst in interface Deque<T>
pollLast
public T pollLast()
- Specified by:
pollLast in interface Deque<T>
pop
public T pop()
- Specified by:
pop in interface Deque<T>
push
public void push(T inE)
- Specified by:
push in interface Deque<T>
remove
public T remove()
- Specified by:
remove in interface Deque<T>- Specified by:
remove in interface Queue<T>
remove
public boolean remove(Object inO)
- Specified by:
remove in interface Collection<T>- Specified by:
remove in interface Deque<T>
removeFirst
public T removeFirst()
- Specified by:
removeFirst in interface Deque<T>
removeFirstOccurrence
public boolean removeFirstOccurrence(Object inO)
- Specified by:
removeFirstOccurrence in interface Deque<T>
removeLast
public T removeLast()
- Specified by:
removeLast in interface Deque<T>
removeLastOccurrence
public boolean removeLastOccurrence(Object inO)
- Specified by:
removeLastOccurrence in interface Deque<T>
size
public int size()
- Specified by:
size in interface Collection<T>- Specified by:
size in interface Deque<T>
hashCode
public int hashCode()
- Specified by:
hashCode in interface Collection<T>- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Specified by:
equals in interface Collection<T>- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012. All Rights Reserved.