Package com.landawn.abacus.util
Class NoCachingNoUpdating.DisposableDeque<T>
java.lang.Object
com.landawn.abacus.util.NoCachingNoUpdating.DisposableDeque<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
NoCachingNoUpdating
- Enclosing interface:
- NoCachingNoUpdating
@Beta
@SequentialOnly
@Stateful
public static class NoCachingNoUpdating.DisposableDeque<T>
extends Object
implements NoCachingNoUpdating
One-off Object. No caching/saving in memory, No updating. To cache/save/update the Object, call
Depends on context, it should be okay to cache/save the elements from the array, but never save or cache the
clone()/copy()
.
Depends on context, it should be okay to cache/save the elements from the array, but never save or cache the
Queue
itself.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.landawn.abacus.util.NoCachingNoUpdating
NoCachingNoUpdating.DisposableArray<T>, NoCachingNoUpdating.DisposableBooleanArray, NoCachingNoUpdating.DisposableByteArray, NoCachingNoUpdating.DisposableCharArray, NoCachingNoUpdating.DisposableDeque<T>, NoCachingNoUpdating.DisposableDoubleArray, NoCachingNoUpdating.DisposableEntry<K,
V>, NoCachingNoUpdating.DisposableFloatArray, NoCachingNoUpdating.DisposableIntArray, NoCachingNoUpdating.DisposableLongArray, NoCachingNoUpdating.DisposableObjArray, NoCachingNoUpdating.DisposablePair<L, R>, NoCachingNoUpdating.DisposableShortArray, NoCachingNoUpdating.DisposableTriple<L, M, R>, NoCachingNoUpdating.Timed<T> -
Method Summary
Modifier and TypeMethodDescription<E extends Exception>
voidaccept
(Throwables.Consumer<? super Deque<T>, E> action) <R,
E extends Exception>
Rapply
(Throwables.Function<? super Deque<T>, R, E> func) static <T> NoCachingNoUpdating.DisposableDeque<T>
create
(int len) <E extends Exception>
voidforEach
(Throwables.Consumer<? super T, E> action) getFirst()
Gets the first.getLast()
Gets the last.int
size()
<A> A[]
toArray
(A[] a) <C extends Collection<T>>
CtoCollection
(IntFunction<? extends C> supplier) toList()
toSet()
toString()
static <T> NoCachingNoUpdating.DisposableDeque<T>
-
Method Details
-
create
-
wrap
- Type Parameters:
T
-- Parameters:
deque
-- Returns:
-
size
public int size()- Returns:
-
getFirst
Gets the first.- Returns:
-
getLast
Gets the last.- Returns:
-
toArray
public <A> A[] toArray(A[] a) - Type Parameters:
A
-- Parameters:
a
-- Returns:
-
toList
- Returns:
-
toSet
- Returns:
-
toCollection
- Type Parameters:
C
-- Parameters:
supplier
-- Returns:
-
forEach
- Parameters:
action
-- Throws:
E extends Exception
-
apply
- Type Parameters:
R
-- Parameters:
func
-- Returns:
- Throws:
E extends Exception
-
accept
- Parameters:
action
-- Throws:
E extends Exception
-
join
- Parameters:
delimiter
-- Returns:
-
toString
-