Top Description Inners Fields Constructors Methods
com.carrotsearch.hppc

public Class IntArrayDeque

extends AbstractIntCollection
implements IntDeque, Preallocable, Cloneable, Accountable
Class Inheritance
All Implemented Interfaces
com.carrotsearch.hppc.Accountable, java.lang.Cloneable, com.carrotsearch.hppc.Preallocable, com.carrotsearch.hppc.IntDeque, com.carrotsearch.hppc.IntCollection, com.carrotsearch.hppc.IntContainer, java.lang.Iterable
Annotations
@Generated:KTypeArrayDeque.java
date:2024-06-04T15:20:17+0200
Static Imports
com.carrotsearch.hppc.Containers.*

An array-backed IntDeque.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
public int[]
buffer

Internal array for storing elements of the deque.

private static final BoundedProportionalArraySizingStrategy
DEFAULT_SIZING_STRATEGY

Reuse the same strategy instance.

public int
head

The index of the element at the head of the deque or an arbitrary number equal to tail if the deque is empty.

protected final ArraySizingStrategy
resizer

Buffer resizing strategy.

public int
tail

The index at which the next element would be added to the tail of the deque.

Constructor Summary

AccessConstructor and Description
public
IntArrayDeque()

New instance with sane defaults.

public
IntArrayDeque(int
The expected number of elements guaranteed not to cause buffer expansion (inclusive).
expectedElements
)

New instance with sane defaults.

public
IntArrayDeque(int
The expected number of elements guaranteed not to cause buffer expansion (inclusive).
expectedElements
,
ArraySizingStrategy
Underlying buffer sizing strategy.
resizer
)

New instance with sane defaults.

public
IntArrayDeque(IntContainer container)

Creates a new deque from elements of another container, appending elements at the end of the deque in the iteration order.

Method Summary

Modifier and TypeMethod and Description
public void
addFirst(int e1)

Implements com.carrotsearch.hppc.IntDeque.addFirst.

Inserts the specified element at the front of this deque.

public final void
addFirst(int...
The elements to add.
elements
)

Vararg-signature method for adding elements at the front of this deque.

public int

Returns:

Returns the number of elements actually added as a result of this call.
addFirst
(IntContainer
The container to iterate over.
container
)

Inserts all elements from the given container to the front of this deque.

public int

Returns:

Returns the number of elements actually added as a result of this call.
addFirst
(Iterable<? extends IntCursor>
The iterable to iterate over.
iterable
)

Inserts all elements from the given iterable to the front of this deque.

public void
addLast(int e1)

Implements com.carrotsearch.hppc.IntDeque.addLast.

Inserts the specified element at the end of this deque.

public final void
addLast(int...
The elements to iterate over.
elements
)

Vararg-signature method for adding elements at the end of this deque.

public int

Returns:

Returns the number of elements actually added as a result of this call.
addLast
(IntContainer
The container to iterate over.
container
)

Inserts all elements from the given container to the end of this deque.

public int

Returns:

Returns the number of elements actually added as a result of this call.
addLast
(Iterable<? extends IntCursor>
The iterable to iterate over.
iterable
)

Inserts all elements from the given iterable to the end of this deque.

public int

Returns:

Returns the index of the first element equal to e1 or -1 if not found.
bufferIndexOf
(int
The element to look for.
e1
)

Return the index of the first (counting from head) element equal to e1.

public void
clear()

Implements com.carrotsearch.hppc.IntCollection.clear.

Removes all elements from this collection.

public IntArrayDeque
clone()

Overrides java.lang.Object.clone.

Clone this object.

public boolean
contains(int e)

Implements com.carrotsearch.hppc.IntContainer.contains.

Lookup a given element in the container.

public <T extends IntProcedure> T
descendingForEach(T procedure)

Implements com.carrotsearch.hppc.IntDeque.descendingForEach, com.carrotsearch.hppc.IntDeque.descendingForEach.

Applies procedure to all elements of this deque, tail to head.

private void
descendingForEach(IntProcedure procedure, int fromIndex, final int toIndex)

Applies procedure to a slice of the deque, toIndex, exclusive, down to fromIndex, inclusive.

public <T extends IntPredicate> T
descendingForEach(T predicate)

Implements com.carrotsearch.hppc.IntDeque.descendingForEach, com.carrotsearch.hppc.IntDeque.descendingForEach.

Applies a procedure to all elements in tail-to-head order.

private void
descendingForEach(IntPredicate predicate, int fromIndex, final int toIndex)

Applies predicate to a slice of the deque, toIndex, exclusive, down to fromIndex, inclusive or until the predicate returns false.

public Iterator<IntCursor>
descendingIterator()

Implements com.carrotsearch.hppc.IntDeque.descendingIterator.

Returns a cursor over the values of this deque (in tail to head order).

protected void
ensureBufferSpace(int expectedAdditions)

Ensures the internal buffer has enough free slots to store expectedAdditions.

public void
ensureCapacity(int
The total number of elements, inclusive.
expectedElements
)

Implements com.carrotsearch.hppc.Preallocable.ensureCapacity.

Ensure this container can hold at least the given number of elements without resizing its buffers.

protected boolean
equalElements(IntArrayDeque other)

Compare order-aligned elements against another IntDeque.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Returns true only if the other object is an instance of the same class and with the same elements.

public <T extends IntProcedure> T
forEach(T procedure)

Implements com.carrotsearch.hppc.IntContainer.forEach, com.carrotsearch.hppc.IntContainer.forEach.

Applies a procedure to all container elements.

private void
forEach(IntProcedure procedure, int fromIndex, final int toIndex)

Applies procedure to a slice of the deque, fromIndex, inclusive, to toIndex, exclusive.

public <T extends IntPredicate> T
forEach(T predicate)

Implements com.carrotsearch.hppc.IntContainer.forEach, com.carrotsearch.hppc.IntContainer.forEach.

Applies a procedure to all container elements.

public static IntArrayDeque
from(int... elements)

Create a new deque by pushing a variable number of arguments to the end of it.

public int
getFirst()

Implements com.carrotsearch.hppc.IntDeque.getFirst.

Retrieves the first element of this deque but does not remove it.

public int
getLast()

Implements com.carrotsearch.hppc.IntDeque.getLast.

Retrieves the last element of this deque but does not remove it.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
isEmpty()

Implements com.carrotsearch.hppc.IntContainer.isEmpty.

Shortcut for size() == 0.

public Iterator<IntCursor>
iterator()

Implements com.carrotsearch.hppc.IntContainer.iterator.

Returns a cursor over the values of this deque (in head to tail order).

public int

Returns:

Returns the index of the first element equal to e1 or -1 if not found.
lastBufferIndexOf
(int
The element to look for.
e1
)

Return the index of the last (counting from tail) element equal to e1.

protected static int
oneLeft(int index, int modulus)

Move one index to the left, wrapping around buffer.

protected static int
oneRight(int index, int modulus)

Move one index to the right, wrapping around buffer.

public long
public long
ramBytesUsed()

Implements com.carrotsearch.hppc.Accountable.ramBytesUsed.

Bytes that is actually been used

public void
release()

Implements com.carrotsearch.hppc.IntCollection.release.

Release internal buffers of this deque and reallocate with the default buffer.

public int
removeAll(int
Element to be removed from this collection, if present.
e1
)

Implements com.carrotsearch.hppc.IntCollection.removeAll.

Removes all occurrences of e from this collection.

public int
removeAll(IntPredicate predicate)

Implements com.carrotsearch.hppc.IntCollection.removeAll.

Removes all elements in this collection for which the given predicate returns true .

public void
removeAtBufferIndex(int
Index of the element to remove. The index must be located between head and tail in modulo buffer arithmetic.
index
)

Removes the element at index in the internal {#link buffer array, returning its value.

public int
removeFirst()

Implements com.carrotsearch.hppc.IntDeque.removeFirst.

Retrieves and removes the first element of this deque.

public int
removeFirst(int e1)

Implements com.carrotsearch.hppc.IntDeque.removeFirst.

Removes the first element that equals e.

public int
removeLast()

Implements com.carrotsearch.hppc.IntDeque.removeLast.

Retrieves and removes the last element of this deque.

public int
removeLast(int e1)

Implements com.carrotsearch.hppc.IntDeque.removeLast.

Removes the last element that equals e.

public int
size()

Implements com.carrotsearch.hppc.IntContainer.size.

Return the current number of elements in this container.

public int[]
toArray()

Overrides com.carrotsearch.hppc.AbstractIntCollection.toArray.

Implements com.carrotsearch.hppc.IntContainer.toArray.

Copies all elements of this container to an array.

public int[]

Returns:

Returns the target argument for chaining.
toArray
(int[]
The target array must be large enough to hold all elements.
target
)

Copies elements of this deque to an array.

Inherited from com.carrotsearch.hppc.AbstractIntCollection:
removeAllretainAllretainAlltoString

Field Detail

bufferback to summary
public int[] buffer

Internal array for storing elements of the deque.

DEFAULT_SIZING_STRATEGYback to summary
private static final BoundedProportionalArraySizingStrategy DEFAULT_SIZING_STRATEGY

Reuse the same strategy instance.

resizerback to summary
protected final ArraySizingStrategy resizer

Buffer resizing strategy.

tailback to summary
public int tail

The index at which the next element would be added to the tail of the deque.

Constructor Detail

IntArrayDequeback to summary
public IntArrayDeque()

New instance with sane defaults.

IntArrayDequeback to summary
public IntArrayDeque(int expectedElements)

New instance with sane defaults.

Parameters
expectedElements:int

The expected number of elements guaranteed not to cause buffer expansion (inclusive).

IntArrayDequeback to summary
public IntArrayDeque(int expectedElements, ArraySizingStrategy resizer)

New instance with sane defaults.

Parameters
expectedElements:int

The expected number of elements guaranteed not to cause buffer expansion (inclusive).

resizer:ArraySizingStrategy

Underlying buffer sizing strategy.

IntArrayDequeback to summary
public IntArrayDeque(IntContainer container)

Creates a new deque from elements of another container, appending elements at the end of the deque in the iteration order.

Method Detail

addFirstback to summary
public void addFirst(int e1)

Implements com.carrotsearch.hppc.IntDeque.addFirst.

Doc from com.carrotsearch.hppc.IntDeque.addFirst.

Inserts the specified element at the front of this deque.

Annotations
@Override
addFirstback to summary
public final void addFirst(int... elements)

Vararg-signature method for adding elements at the front of this deque.

This method is handy, but costly if used in tight loops (anonymous array passing)

Parameters
elements:int[]

The elements to add.

addFirstback to summary
public int addFirst(IntContainer container)

Inserts all elements from the given container to the front of this deque.

Parameters
container:IntContainer

The container to iterate over.

Returns:int

Returns the number of elements actually added as a result of this call.

addFirstback to summary
public int addFirst(Iterable<? extends IntCursor> iterable)

Inserts all elements from the given iterable to the front of this deque.

Parameters
iterable:Iterable<? extends IntCursor>

The iterable to iterate over.

Returns:int

Returns the number of elements actually added as a result of this call.

addLastback to summary
public void addLast(int e1)

Implements com.carrotsearch.hppc.IntDeque.addLast.

Doc from com.carrotsearch.hppc.IntDeque.addLast.

Inserts the specified element at the end of this deque.

Annotations
@Override
addLastback to summary
public final void addLast(int... elements)

Vararg-signature method for adding elements at the end of this deque.

This method is handy, but costly if used in tight loops (anonymous array passing)

Parameters
elements:int[]

The elements to iterate over.

addLastback to summary
public int addLast(IntContainer container)

Inserts all elements from the given container to the end of this deque.

Parameters
container:IntContainer

The container to iterate over.

Returns:int

Returns the number of elements actually added as a result of this call.

addLastback to summary
public int addLast(Iterable<? extends IntCursor> iterable)

Inserts all elements from the given iterable to the end of this deque.

Parameters
iterable:Iterable<? extends IntCursor>

The iterable to iterate over.

Returns:int

Returns the number of elements actually added as a result of this call.

bufferIndexOfback to summary
public int bufferIndexOf(int e1)

Return the index of the first (counting from head) element equal to e1. The index points to the buffer array.

Parameters
e1:int

The element to look for.

Returns:int

Returns the index of the first element equal to e1 or -1 if not found.

clearback to summary
public void clear()

Implements com.carrotsearch.hppc.IntCollection.clear.

Doc from com.carrotsearch.hppc.IntCollection.clear.

Removes all elements from this collection.

The internal array buffers are not released as a result of this call.

Annotations
@Override
See Also
release()
cloneback to summary
public IntArrayDeque clone()

Overrides java.lang.Object.clone.

Clone this object. The returned clone will reuse the same hash function and array resizing strategy.

Returns:IntArrayDeque

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
containsback to summary
public boolean contains(int e)

Implements com.carrotsearch.hppc.IntContainer.contains.

Doc from com.carrotsearch.hppc.IntContainer.contains.

Lookup a given element in the container. This operation has no speed guarantees (may be linear with respect to the size of this container).

Returns:boolean

Returns true if this container has an element equal to e.

Annotations
@Override
descendingForEachback to summary
public <T extends IntProcedure> T descendingForEach(T procedure)

Implements com.carrotsearch.hppc.IntDeque.descendingForEach, com.carrotsearch.hppc.IntDeque.descendingForEach.

Applies procedure to all elements of this deque, tail to head.

Annotations
@Override
descendingForEachback to summary
private void descendingForEach(IntProcedure procedure, int fromIndex, final int toIndex)

Applies procedure to a slice of the deque, toIndex, exclusive, down to fromIndex, inclusive.

descendingForEachback to summary
public <T extends IntPredicate> T descendingForEach(T predicate)

Implements com.carrotsearch.hppc.IntDeque.descendingForEach, com.carrotsearch.hppc.IntDeque.descendingForEach.

Doc from com.carrotsearch.hppc.IntDeque.descendingForEach.

Applies a procedure to all elements in tail-to-head order.

Annotations
@Override
descendingForEachback to summary
private void descendingForEach(IntPredicate predicate, int fromIndex, final int toIndex)

Applies predicate to a slice of the deque, toIndex, exclusive, down to fromIndex, inclusive or until the predicate returns false.

descendingIteratorback to summary
public Iterator<IntCursor> descendingIterator()

Implements com.carrotsearch.hppc.IntDeque.descendingIterator.

Returns a cursor over the values of this deque (in tail to head order). The iterator is implemented as a cursor and it returns the same cursor instance on every call to Iterator#next() (to avoid boxing of primitive types). To read the current value (or index in the deque's buffer) use the cursor's public fields. An example is shown below.

for (Iterator<IntCursor> i = intDeque.descendingIterator(); i.hasNext();) {
  final IntCursor c = i.next();
  System.out.println("buffer index=" + c.index + " value=" + c.value);
}
Returns:Iterator<IntCursor>

Doc from com.carrotsearch.hppc.IntDeque.descendingIterator.

An iterator over elements in this deque in tail-to-head order.

ensureBufferSpaceback to summary
protected void ensureBufferSpace(int expectedAdditions)

Ensures the internal buffer has enough free slots to store expectedAdditions. Increases internal buffer size if needed.

ensureCapacityback to summary
public void ensureCapacity(int expectedElements)

Implements com.carrotsearch.hppc.Preallocable.ensureCapacity.

Ensure this container can hold at least the given number of elements without resizing its buffers.

Parameters
expectedElements:int

The total number of elements, inclusive.

Annotations
@Override
equalElementsback to summary
protected boolean equalElements(IntArrayDeque other)

Compare order-aligned elements against another IntDeque.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Returns true only if the other object is an instance of the same class and with the same elements.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
forEachback to summary
public <T extends IntProcedure> T forEach(T procedure)

Implements com.carrotsearch.hppc.IntContainer.forEach, com.carrotsearch.hppc.IntContainer.forEach.

Doc from com.carrotsearch.hppc.IntContainer.forEach.

Applies a procedure to all container elements. Returns the argument (any subclass of IntProcedure. This lets the caller to call methods of the argument by chaining the call (even if the argument is an anonymous type) to retrieve computed values, for example (IntContainer):

int count = container.forEach(new IntProcedure() {
  int count; // this is a field declaration in an anonymous class.

  public void apply(int value) {
    count++;
  }
}).count;
Annotations
@Override
forEachback to summary
private void forEach(IntProcedure procedure, int fromIndex, final int toIndex)

Applies procedure to a slice of the deque, fromIndex, inclusive, to toIndex, exclusive.

forEachback to summary
public <T extends IntPredicate> T forEach(T predicate)

Implements com.carrotsearch.hppc.IntContainer.forEach, com.carrotsearch.hppc.IntContainer.forEach.

Doc from com.carrotsearch.hppc.IntContainer.forEach.

Applies a procedure to all container elements. Returns the argument (any subclass of IntProcedure. This lets the caller to call methods of the argument by chaining the call (even if the argument is an anonymous type) to retrieve computed values, for example (IntContainer):

int count = container.forEach(new IntProcedure() {
  int count; // this is a field declaration in an anonymous class.

  public void apply(int value) {
    count++;
  }
}).count;
Annotations
@Override
fromback to summary
public static IntArrayDeque from(int... elements)

Create a new deque by pushing a variable number of arguments to the end of it.

getFirstback to summary
public int getFirst()

Implements com.carrotsearch.hppc.IntDeque.getFirst.

Doc from com.carrotsearch.hppc.IntDeque.getFirst.

Retrieves the first element of this deque but does not remove it.

Returns:int

the head of this deque.

Annotations
@Override
getLastback to summary
public int getLast()

Implements com.carrotsearch.hppc.IntDeque.getLast.

Doc from com.carrotsearch.hppc.IntDeque.getLast.

Retrieves the last element of this deque but does not remove it.

Returns:int

the head of this deque.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements com.carrotsearch.hppc.IntContainer.isEmpty.

Doc from com.carrotsearch.hppc.IntContainer.isEmpty.

Shortcut for size() == 0.

Annotations
@Override
iteratorback to summary
public Iterator<IntCursor> iterator()

Implements com.carrotsearch.hppc.IntContainer.iterator.

Returns a cursor over the values of this deque (in head to tail order). The iterator is implemented as a cursor and it returns the same cursor instance on every call to Iterator#next() (to avoid boxing of primitive types). To read the current value (or index in the deque's buffer) use the cursor's public fields. An example is shown below.

for (IntValueCursor c : intDeque) {
  System.out.println("buffer index=" + c.index + " value=" + c.value);
}
Returns:Iterator<IntCursor>

Doc from java.lang.Iterable.iterator.

an Iterator.

lastBufferIndexOfback to summary
public int lastBufferIndexOf(int e1)

Return the index of the last (counting from tail) element equal to e1. The index points to the buffer array.

Parameters
e1:int

The element to look for.

Returns:int

Returns the index of the first element equal to e1 or -1 if not found.

oneLeftback to summary
protected static int oneLeft(int index, int modulus)

Move one index to the left, wrapping around buffer.

oneRightback to summary
protected static int oneRight(int index, int modulus)

Move one index to the right, wrapping around buffer.

ramBytesAllocatedback to summary
public long ramBytesAllocated()

Implements com.carrotsearch.hppc.Accountable.ramBytesAllocated.

Doc from com.carrotsearch.hppc.Accountable.ramBytesAllocated.

Allocated memory estimation

Returns:long

Ram allocated in bytes

Annotations
@Override
ramBytesUsedback to summary
public long ramBytesUsed()

Implements com.carrotsearch.hppc.Accountable.ramBytesUsed.

Doc from com.carrotsearch.hppc.Accountable.ramBytesUsed.

Bytes that is actually been used

Returns:long

Ram used in bytes

Annotations
@Override
releaseback to summary
public void release()

Implements com.carrotsearch.hppc.IntCollection.release.

Release internal buffers of this deque and reallocate with the default buffer.

removeAllback to summary
public int removeAll(int e1)

Implements com.carrotsearch.hppc.IntCollection.removeAll.

Doc from com.carrotsearch.hppc.IntCollection.removeAll.

Removes all occurrences of e from this collection.

Parameters
e1:int

Element to be removed from this collection, if present.

Returns:int

The number of removed elements as a result of this call.

Annotations
@Override
removeAllback to summary
public int removeAll(IntPredicate predicate)

Implements com.carrotsearch.hppc.IntCollection.removeAll.

Doc from com.carrotsearch.hppc.IntCollection.removeAll.

Removes all elements in this collection for which the given predicate returns true .

Returns:int

Returns the number of removed elements.

Annotations
@Override
removeAtBufferIndexback to summary
public void removeAtBufferIndex(int index)

Removes the element at index in the internal {#link buffer array, returning its value.

Parameters
index:int

Index of the element to remove. The index must be located between head and tail in modulo buffer arithmetic.

removeFirstback to summary
public int removeFirst()

Implements com.carrotsearch.hppc.IntDeque.removeFirst.

Doc from com.carrotsearch.hppc.IntDeque.removeFirst.

Retrieves and removes the first element of this deque.

Returns:int

the head (first) element of this deque.

Annotations
@Override
removeFirstback to summary
public int removeFirst(int e1)

Implements com.carrotsearch.hppc.IntDeque.removeFirst.

Doc from com.carrotsearch.hppc.IntDeque.removeFirst.

Removes the first element that equals e.

Returns:int

The deleted element's index or -1 if the element was not found.

Annotations
@Override
removeLastback to summary
public int removeLast()

Implements com.carrotsearch.hppc.IntDeque.removeLast.

Doc from com.carrotsearch.hppc.IntDeque.removeLast.

Retrieves and removes the last element of this deque.

Returns:int

the tail of this deque.

Annotations
@Override
removeLastback to summary
public int removeLast(int e1)

Implements com.carrotsearch.hppc.IntDeque.removeLast.

Doc from com.carrotsearch.hppc.IntDeque.removeLast.

Removes the last element that equals e.

Returns:int

The deleted element's index or -1 if the element was not found.

Annotations
@Override
sizeback to summary
public int size()

Implements com.carrotsearch.hppc.IntContainer.size.

Doc from com.carrotsearch.hppc.IntContainer.size.

Return the current number of elements in this container. The time for calculating the container's size may take O(n) time, although implementing classes should try to maintain the current size and return in constant time.

Annotations
@Override
toArrayback to summary
public int[] toArray()

Overrides com.carrotsearch.hppc.AbstractIntCollection.toArray.

Implements com.carrotsearch.hppc.IntContainer.toArray.

Doc from com.carrotsearch.hppc.IntContainer.toArray.

Copies all elements of this container to an array.

The returned array is always a copy, regardless of the storage used by the container.

Annotations
@Override
toArrayback to summary
public int[] toArray(int[] target)

Copies elements of this deque to an array. The content of the target array is filled from index 0 (head of the queue) to index size() - 1 (tail of the queue).

Parameters
target:int[]

The target array must be large enough to hold all elements.

Returns:int[]

Returns the target argument for chaining.

com.carrotsearch.hppc back to summary

private final Class IntArrayDeque.DescendingValueIterator

extends AbstractIterator<IntCursor>
Class Inheritance

An iterator implementation for ObjectArrayDeque#descendingIterator().

Field Summary

Modifier and TypeField and Description
private final IntCursor
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected IntCursor
fetch()

Implements abstract com.carrotsearch.hppc.AbstractIterator.fetch.

Fetch next element.

Inherited from com.carrotsearch.hppc.AbstractIterator:
donehasNextnextremove

Field Detail

cursorback to summary
private final IntCursor cursor
remainingback to summary
private int remaining

Constructor Detail

DescendingValueIteratorback to summary
public DescendingValueIterator()

Method Detail

fetchback to summary
protected IntCursor fetch()

Implements abstract com.carrotsearch.hppc.AbstractIterator.fetch.

Doc from com.carrotsearch.hppc.AbstractIterator.fetch.

Fetch next element. The implementation must return done() when all elements have been fetched.

Returns:IntCursor

Returns the next value for the iterator or chain-calls done().

Annotations
@Override
com.carrotsearch.hppc back to summary

private final Class IntArrayDeque.ValueIterator

extends AbstractIterator<IntCursor>
Class Inheritance

An iterator implementation for ObjectArrayDeque#iterator.

Field Summary

Modifier and TypeField and Description
private final IntCursor
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected IntCursor
fetch()

Implements abstract com.carrotsearch.hppc.AbstractIterator.fetch.

Fetch next element.

Inherited from com.carrotsearch.hppc.AbstractIterator:
donehasNextnextremove

Field Detail

cursorback to summary
private final IntCursor cursor
remainingback to summary
private int remaining

Constructor Detail

ValueIteratorback to summary
public ValueIterator()

Method Detail

fetchback to summary
protected IntCursor fetch()

Implements abstract com.carrotsearch.hppc.AbstractIterator.fetch.

Doc from com.carrotsearch.hppc.AbstractIterator.fetch.

Fetch next element. The implementation must return done() when all elements have been fetched.

Returns:IntCursor

Returns the next value for the iterator or chain-calls done().

Annotations
@Override