Package net.kyori.adventure.util
Class MonkeyBars
- java.lang.Object
 - 
- net.kyori.adventure.util.MonkeyBars
 
 
- 
public final class MonkeyBars extends Object
Collectionrelated utilities.- Since:
 - 4.8.0
 
 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> @NotNull List<T>addOne(@NotNull List<T> oldList, T newElement)Adds an element to the end of the list, or returns a new list.static <E extends Enum<E>>
@NotNull Set<E>enumSet(Class<E> type, E @NotNull ... constants)Creates a set from an array of enum constants. 
 - 
 
- 
- 
Method Detail
- 
enumSet
@SafeVarargs @NotNull public static <E extends Enum<E>> @NotNull Set<E> enumSet(Class<E> type, E @NotNull ... constants)
Creates a set from an array of enum constants.- Type Parameters:
 E- the enum type- Parameters:
 type- the enum typeconstants- the enum constants- Returns:
 - the set
 - Since:
 - 4.0.0
 
 
- 
addOne
@NotNull public static <T> @NotNull List<T> addOne(@NotNull @NotNull List<T> oldList, T newElement)
Adds an element to the end of the list, or returns a new list.The returned list is unmodifiable.
- Type Parameters:
 T- the element type- Parameters:
 oldList- the old listnewElement- the element to add- Returns:
 - a list
 - Since:
 - 4.8.0
 
 
 - 
 
 -