Class VariableList
java.lang.Object
com.pixelmonmod.pixelmon.api.util.VariableList
A list of the variables stored for things such as
BuildableInteractionConditions-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tget(int index) Gets the object at the index<T> TGets the object for the given class at the index<T> DataProvider<T> getProvider(int index) Gets theDataProviderat the index
This will throw aClassCastExceptionif the object at the specified index is not aDataProvider<T> DataProvider<T> getProvider(int index, Class<T> clazz) Gets theDataProviderat the index
This will throw aClassCastExceptionif the object at the specified index is not aDataProviderstatic VariableListof()Creates an emptyVariableListstatic <T> VariableListCreates aVariableListwith the given objects
-
Field Details
-
objects
-
-
Constructor Details
-
VariableList
-
-
Method Details
-
of
Creates an emptyVariableList- Returns:
- The list
-
of
Creates aVariableListwith 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 theDataProviderat the index
This will throw aClassCastExceptionif the object at the specified index is not aDataProvider- Type Parameters:
T- The type- Parameters:
index- The index- Returns:
- The value
-
getProvider
Gets theDataProviderat the index
This will throw aClassCastExceptionif the object at the specified index is not aDataProvider- Type Parameters:
T- The type- Parameters:
index- The indexclazz- The class- Returns:
- The value
-