Package org.apache.ignite.util.deque
Class FastSizeDeque<E>
- java.lang.Object
-
- org.apache.ignite.util.deque.FastSizeDeque<E>
-
-
Constructor Summary
Constructors Constructor Description FastSizeDeque(Deque<E> deque)Creates a decorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(@NotNull Collection<? extends E> col)Adds all of the elements in the specified collection at the end of this deque.voidaddFirst(E e)voidaddLast(E e)voidclear()booleancontains(Object o)booleancontainsAll(@NotNull Collection<?> col)@NotNull Iterator<E>descendingIterator()Eelement()EgetFirst()EgetLast()booleanisEmpty()booleanisEmptyx()Tests this deque for emptiness.; equivalent tosizex() == 0.@NotNull Iterator<E>iterator()booleanoffer(E e)booleanofferFirst(E e)booleanofferLast(E e)Epeek()EpeekFirst()EpeekLast()Epoll()EpollFirst()EpollLast()Epop()voidpush(E e)Eremove()booleanremove(Object o)booleanremoveAll(@NotNull Collection<?> col)EremoveFirst()booleanremoveFirstOccurrence(Object o)booleanremoveIf(Predicate<? super E> pred)EremoveLast()booleanremoveLastOccurrence(Object o)booleanretainAll(@NotNull Collection<?> col)intsize()intsizex()Fast size getter.@NotNull Object[]toArray()<T> @NotNull T[]toArray(@NotNull T[] ts)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, spliterator, stream, toArray
-
-
-
-
Method Detail
-
sizex
public int sizex()
Fast size getter.- Returns:
- Deque size.
-
isEmptyx
public boolean isEmptyx()
Tests this deque for emptiness.; equivalent tosizex() == 0.- Returns:
Trueif this deque is empty.
-
offerFirst
public boolean offerFirst(E e)
- Specified by:
offerFirstin interfaceDeque<E>
-
removeFirst
public E removeFirst()
- Specified by:
removeFirstin interfaceDeque<E>
-
removeLast
public E removeLast()
- Specified by:
removeLastin interfaceDeque<E>
-
removeFirstOccurrence
public boolean removeFirstOccurrence(Object o)
- Specified by:
removeFirstOccurrencein interfaceDeque<E>
-
removeLastOccurrence
public boolean removeLastOccurrence(Object o)
- Specified by:
removeLastOccurrencein interfaceDeque<E>
-
add
public boolean add(E e)
-
offer
public boolean offer(E e)
-
remove
public E remove()
-
poll
public E poll()
-
element
public E element()
-
peek
public E peek()
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(@NotNull @NotNull Collection<?> col)- Specified by:
containsAllin interfaceCollection<E>
-
addAll
public boolean addAll(@NotNull @NotNull Collection<? extends E> col)Adds all of the elements in the specified collection at the end of this deque. Note: If collection being added can mutate concurrently, or underlying deque implementation allows partial insertion, then subsequent calls tosize()can report incorrect value.
-
removeAll
public boolean removeAll(@NotNull @NotNull Collection<?> col)- Specified by:
removeAllin interfaceCollection<E>
-
removeIf
public boolean removeIf(Predicate<? super E> pred)
- Specified by:
removeIfin interfaceCollection<E>
-
retainAll
public boolean retainAll(@NotNull @NotNull Collection<?> col)- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
contains
public boolean contains(Object o)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
toArray
@NotNull public @NotNull Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] ts)- Specified by:
toArrayin interfaceCollection<E>
-
descendingIterator
@NotNull public @NotNull Iterator<E> descendingIterator()
- Specified by:
descendingIteratorin interfaceDeque<E>
-
-