Package com.landawn.abacus.util
Class NoCachingNoUpdating.DisposablePair<L,R>
java.lang.Object
com.landawn.abacus.util.NoCachingNoUpdating.DisposablePair<L,R>
- Type Parameters:
L
-R
-
- All Implemented Interfaces:
NoCachingNoUpdating
- Enclosing interface:
- NoCachingNoUpdating
@Beta
@SequentialOnly
@Stateful
public abstract static class NoCachingNoUpdating.DisposablePair<L,R>
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
Pair
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> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<E extends Exception>
voidaccept
(Throwables.BiConsumer<? super L, ? super R, E> action) <U,
E extends Exception>
Uapply
(Throwables.BiFunction<? super L, ? super R, ? extends U, E> func) copy()
abstract L
left()
abstract R
right()
toString()
static <L,
R> NoCachingNoUpdating.DisposablePair<L, R>
-
Constructor Details
-
DisposablePair
public DisposablePair()
-
-
Method Details
-
wrap
- Type Parameters:
L
-R
-- Parameters:
p
-- Returns:
-
left
- Returns:
-
right
- Returns:
-
copy
- Returns:
-
apply
public <U,E extends Exception> U apply(Throwables.BiFunction<? super L, ? super R, throws E? extends U, E> func) - Type Parameters:
U
-E
-- Parameters:
func
-- Returns:
- Throws:
E
-
accept
public <E extends Exception> void accept(Throwables.BiConsumer<? super L, ? super R, throws EE> action) - Type Parameters:
E
-- Parameters:
action
-- Throws:
E
-
toString
-