| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index)
Returns the item at the given
index. |
boolean |
getBoolean(int index)
Returns the item at the given
index as a boolean. |
double |
getDouble(int index)
Returns the item at the given
index as a double. |
int |
getInteger(int index)
Returns the item at the given
index as an int. |
<T> List<T> |
getItems(Class<? extends T> itemType)
Returns all items that are of the given
itemType - including sub-types. |
TypedListView |
getListView(int index)
Returns the item at the given
index as a TypedListView. |
TypedMapView |
getMapView(int index)
Returns the item at the given
index as a TypedMapView. |
Number |
getNumber(int index)
Returns the item at the given
index as a Number. |
int |
getSize()
Returns the size of the underlying
List. |
String |
getString(int index)
Returns the item at the given
index as a String. |
public boolean getBoolean(int index)
throws IndexOutOfBoundsException,
ValueCastException
index as a boolean.index - The list index of the item.index as a boolean.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a boolean.@Nullable public Object get(int index) throws IndexOutOfBoundsException
index.index - The list index of the item.index.IndexOutOfBoundsException - Thrown if the given index is out of bounds.public int getSize()
List.List.public int getInteger(int index)
throws IndexOutOfBoundsException,
ValueCastException
index as an int.index - The list index of the item.index as an int.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not an int.@Nonnull public Number getNumber(int index) throws IndexOutOfBoundsException, ValueCastException
index as a Number.index - The list index of the item.index as a Number.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a Number.public double getDouble(int index)
throws IndexOutOfBoundsException,
ValueCastException
index as a double.index - The list index of the item.index as a double.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a double.@Nonnull public String getString(int index) throws IndexOutOfBoundsException, ValueCastException
index as a String.index - The list index of the item.index as a String.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a String.@Nonnull public TypedMapView getMapView(int index) throws IndexOutOfBoundsException, ValueCastException
index as a TypedMapView.index - The list index of the item.index as a TypedMapView.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a TypedMapView.@Nonnull public TypedListView getListView(int index) throws IndexOutOfBoundsException, ValueCastException
index as a TypedListView.index - The list index of the item.index as a TypedListView.IndexOutOfBoundsException - Thrown if the given index is out of bounds.ValueCastException - Thrown if the item is not a TypedListView.@Nonnull public <T> List<T> getItems(@Nonnull Class<? extends T> itemType)
itemType - including sub-types.T - The item type.itemType - The Class of the items that should be returned.TypedMapView that are of (a sub-)type of the given itemType.Copyright © 2024. All rights reserved.