Package com.carrotsearch.hppc
Interface FloatDeque
-
- All Superinterfaces:
FloatCollection,FloatContainer,java.lang.Iterable<FloatCursor>
- All Known Implementing Classes:
FloatArrayDeque
@Generated(date="2024-05-16T12:00:00+0000", value="KTypeDeque.java") public interface FloatDeque extends FloatCollectionA linear collection that supports element insertion and removal at both ends.- See Also:
Deque
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFirst(float e)Inserts the specified element at the front of this deque.voidaddLast(float e)Inserts the specified element at the end of this deque.<T extends FloatProcedure>
TdescendingForEach(T procedure)Applies aprocedureto all elements in tail-to-head order.java.util.Iterator<FloatCursor>descendingIterator()floatgetFirst()Retrieves the first element of this deque but does not remove it.floatgetLast()Retrieves the last element of this deque but does not remove it.floatremoveFirst()Retrieves and removes the first element of this deque.intremoveFirst(float e)Removes the first element that equalse.floatremoveLast()Retrieves and removes the last element of this deque.intremoveLast(float e)Removes the last element that equalse.-
Methods inherited from interface com.carrotsearch.hppc.FloatCollection
clear, release, removeAll, removeAll, removeAll, retainAll, retainAll
-
-
-
-
Method Detail
-
removeFirst
int removeFirst(float e)
Removes the first element that equalse.- Returns:
- The deleted element's index or
-1if the element was not found.
-
removeLast
int removeLast(float e)
Removes the last element that equalse.- Returns:
- The deleted element's index or
-1if the element was not found.
-
addFirst
void addFirst(float e)
Inserts the specified element at the front of this deque.
-
addLast
void addLast(float e)
Inserts the specified element at the end of this deque.
-
removeFirst
float removeFirst()
Retrieves and removes the first element of this deque.- Returns:
- the head (first) element of this deque.
-
removeLast
float removeLast()
Retrieves and removes the last element of this deque.- Returns:
- the tail of this deque.
-
getFirst
float getFirst()
Retrieves the first element of this deque but does not remove it.- Returns:
- the head of this deque.
-
getLast
float getLast()
Retrieves the last element of this deque but does not remove it.- Returns:
- the head of this deque.
-
descendingIterator
java.util.Iterator<FloatCursor> descendingIterator()
- Returns:
- An iterator over elements in this deque in tail-to-head order.
-
descendingForEach
<T extends FloatProcedure> T descendingForEach(T procedure)
Applies aprocedureto all elements in tail-to-head order.
-
descendingForEach
<T extends FloatPredicate> T descendingForEach(T predicate)
Applies apredicateto container elements as long, as the predicate returnstrue. The iteration is interrupted otherwise.
-
-