Package com.landawn.abacus.util
Class NoCachingNoUpdating.DisposableShortArray
java.lang.Object
com.landawn.abacus.util.NoCachingNoUpdating.DisposableShortArray
- All Implemented Interfaces:
NoCachingNoUpdating
,Cloneable
- Enclosing interface:
NoCachingNoUpdating
@Beta
@SequentialOnly
@Stateful
public static class NoCachingNoUpdating.DisposableShortArray
extends Object
implements NoCachingNoUpdating, Cloneable
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 array itself.
clone()/copy()
.
Depends on context, it should be okay to cache/save the elements from the array, but never save or cache the array 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 short[], E> action) <R,
E extends Exception>
Rapply
(Throwables.Function<? super short[], ? extends R, E> func) double
average()
Short[]
box()
short[]
clone()
create
(int len) <E extends Exception>
voidforEach
(Throwables.ShortConsumer<E> action) short
get
(int index) int
length()
short
max()
short
min()
int
sum()
<C extends Collection<Short>>
CtoCollection
(IntFunction<? extends C> supplier) toList()
toString()
wrap
(short[] a)
-
Method Details
-
create
- Parameters:
len
-- Returns:
-
wrap
- Parameters:
a
-- Returns:
-
get
public short get(int index) - Parameters:
index
-- Returns:
-
length
public int length() -
clone
public short[] clone() -
box
-
toList
-
toCollection
- Type Parameters:
C
-- Parameters:
supplier
-- Returns:
-
sum
public int sum() -
average
public double average() -
min
public short min() -
max
public short max() -
forEach
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
-
apply
public <R,E extends Exception> R apply(Throwables.Function<? super short[], ? extends R, throws EE> func) - Type Parameters:
R
-E
-- Parameters:
func
-- Returns:
- Throws:
E
-
accept
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
-
join
- Parameters:
delimiter
-- Returns:
-
join
- Parameters:
delimiter
-prefix
-suffix
-- Returns:
-
toString
-