Class VariableList
java.lang.Object
com.pixelmonmod.pixelmon.api.util.VariableList
A list of the variables stored for things such as
BuildableInteractionCondition
s-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
get
(int index) Gets the object at the index<T> T
Gets the object for the given class at the index<T> DataProvider<T>
getProvider
(int index) Gets theDataProvider
at the index
This will throw aClassCastException
if the object at the specified index is not aDataProvider
<T> DataProvider<T>
getProvider
(int index, Class<T> clazz) Gets theDataProvider
at the index
This will throw aClassCastException
if the object at the specified index is not aDataProvider
static VariableList
of()
Creates an emptyVariableList
static <T> VariableList
Creates aVariableList
with the given objects
-
Field Details
-
objects
-
-
Constructor Details
-
VariableList
-
-
Method Details
-
of
Creates an emptyVariableList
- Returns:
- The list
-
of
Creates aVariableList
with the given objects- Parameters:
objects
- The objects- Returns:
- The list
-
get
public <T> T get(int index) Gets the object at the index- Type Parameters:
T
- The type- Parameters:
index
- The index- Returns:
- The value
-
get
Gets the object for the given class at the index- Type Parameters:
T
- The type- Parameters:
index
- The indexclazz
- The class- Returns:
- The value
-
getProvider
Gets theDataProvider
at the index
This will throw aClassCastException
if the object at the specified index is not aDataProvider
- Type Parameters:
T
- The type- Parameters:
index
- The index- Returns:
- The value
-
getProvider
Gets theDataProvider
at the index
This will throw aClassCastException
if the object at the specified index is not aDataProvider
- Type Parameters:
T
- The type- Parameters:
index
- The indexclazz
- The class- Returns:
- The value
-