Class IngredientList
java.lang.Object
java.util.AbstractCollection<xyz.xenondevs.invui.gui.structure.Ingredient>
java.util.AbstractList<xyz.xenondevs.invui.gui.structure.Ingredient>
java.util.ArrayList<xyz.xenondevs.invui.gui.structure.Ingredient>
xyz.xenondevs.invui.gui.structure.IngredientList
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<xyz.xenondevs.invui.gui.structure.Ingredient>
,Collection<xyz.xenondevs.invui.gui.structure.Ingredient>
,List<xyz.xenondevs.invui.gui.structure.Ingredient>
,RandomAccess
,SequencedCollection<xyz.xenondevs.invui.gui.structure.Ingredient>
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionIngredientList
(int width, int height, String structure, HashMap<Character, xyz.xenondevs.invui.gui.structure.Ingredient> ingredientMap) Creates a newIngredientList
. -
Method Summary
Modifier and TypeMethodDescriptionint[]
Finds all indices of theMarkers.CONTENT_LIST_SLOT_HORIZONTAL
andMarkers.CONTENT_LIST_SLOT_VERTICAL
Markers
.int[]
findIndicesOfMarker
(Marker marker) Finds all indices of the specifiedMarker
.void
insertIntoGui
(Gui gui) Inserts theIngredients
into the specifiedGui
.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
IngredientList
public IngredientList(int width, int height, String structure, HashMap<Character, xyz.xenondevs.invui.gui.structure.Ingredient> ingredientMap) Creates a newIngredientList
.- Parameters:
width
- The width of the structure.height
- The height of the structure.structure
- The structure string.ingredientMap
- TheHashMap
containing theIngredients
.
-
-
Method Details
-
insertIntoGui
Inserts theIngredients
into the specifiedGui
.- Parameters:
gui
- TheGui
.
-
findIndicesOfMarker
Finds all indices of the specifiedMarker
.- Parameters:
marker
- TheMarker
.- Returns:
- The indices.
-
findContentListSlots
public int[] findContentListSlots()Finds all indices of theMarkers.CONTENT_LIST_SLOT_HORIZONTAL
andMarkers.CONTENT_LIST_SLOT_VERTICAL
Markers
.- Returns:
- The indices.
-