Adds a new Lists utility helper
This commit is contained in:
parent
05970bdefc
commit
16e49bedfc
1 changed files with 23 additions and 0 deletions
23
src/main/java/dev/zontreck/ariaslib/util/Lists.java
Normal file
23
src/main/java/dev/zontreck/ariaslib/util/Lists.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
package dev.zontreck.ariaslib.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Lists
|
||||
{
|
||||
public static <T> List<T> of(T... values)
|
||||
{
|
||||
List<T> arr = new ArrayList<>();
|
||||
for(T value : values)
|
||||
{
|
||||
arr.add(value);
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
private Lists(){
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue