Package net.dermetfan.gdx.utils
Class ArrayPools
java.lang.Object
net.dermetfan.gdx.utils.ArrayPools
stores a map of
ArrayPools (usually ReflectionArrayPool) for convenient static access- Since:
- 0.11.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidfree(float[] array) static voidfree(int[] array) static <T> voidfree(T[] array) static <T> ArrayPool<T> callsget(Class, int, int)with a max size of -1 (no max size) and a maxEach size of 100static <T> ArrayPool<T> note the max and maxEach sizes are ignored if this is not the first time this pool has been requestedstatic FloatArrayPoolstatic FloatArrayPoolgetFloats(int max, int maxEach) static IntArrayPoolgetInts()static IntArrayPoolgetInts(int max, int maxEach) static <T> T[]static float[]obtainFloats(int length) static int[]obtainInts(int length) static <T> voidstatic voidset(FloatArrayPool pool) static voidset(IntArrayPool pool)
-
Method Details
-
get
note the max and maxEach sizes are ignored if this is not the first time this pool has been requested- Returns:
- a new
ReflectionArrayPoolor existing pool for the specified type, stored in a Class toArrayPoolmap
-
getFloats
- See Also:
-
getInts
- See Also:
-
get
callsget(Class, int, int)with a max size of -1 (no max size) and a maxEach size of 100- See Also:
-
getFloats
- See Also:
-
getInts
- See Also:
-
set
- Parameters:
type- the type for which to set the pool in a Class toArrayPoolmappool- the pool to set for the given type
-
set
- See Also:
-
set
- See Also:
-
obtain
- See Also:
-
obtainFloats
public static float[] obtainFloats(int length) - See Also:
-
obtainInts
public static int[] obtainInts(int length) - See Also:
-
free
public static <T> void free(T[] array) - See Also:
-
free
public static void free(float[] array) - See Also:
-
free
public static void free(int[] array) - See Also:
-