Package com.esotericpig.jeso
Class Arys
java.lang.Object
com.esotericpig.jeso.Arys
- Author:
- Jonathan Bradley Whited
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]
compact
(T... ary) static <T> T[]
compactMut
(T[] ary) static <T> String
join
(T... ary) static <T> String
joins
(char separator, T... ary) static <T> String
joins
(CharSequence separator, T... ary) static <T> T[]
newArray
(T[] ary, int length) java.util.Arrays#copyOfRange(...) does the same thing.static <T> T
static <T> T
sample
(T... ary) static <T> T[]
static <T> T[]
samples
(int count, T... ary) static <T> T[]
static <T> T[]
unique
(T... ary) static <T> T[]
uniqueMut
(T[] ary)
-
Field Details
-
DEFAULT_JOIN_SEPARATOR
- See Also:
-
-
Method Details
-
compact
-
compactMut
public static <T> T[] compactMut(T[] ary) -
join
-
joins
-
joins
-
newArray
public static <T> T[] newArray(T[] ary, int length) java.util.Arrays#copyOfRange(...) does the same thing. This does not modify the
ary
arg.- Type Parameters:
T
- the type of array to create- Parameters:
ary
- the array to use for getting the Class data and component typelength
- the length of the new array- Returns:
- the new array
-
sample
-
sample
-
samples
-
samples
-
unique
-
uniqueMut
public static <T> T[] uniqueMut(T[] ary) -
toArray
-