Interface ListCompatWrapper
- All Superinterfaces:
CompatWrapper
- All Known Implementing Classes:
ListCompatWrapper_Java_17,ListCompatWrapper_Java_21
-
Method Summary
Modifier and TypeMethodDescriptiondefault <E> EGets the first element of a list.default <E> EGets the last element of a list.default <E> EremoveFirst(List<E> list) Removes and returns the first element of a list.default <E> EremoveLast(List<E> list) Removes and returns the last element of a list.Methods inherited from interface net.thomilist.dimensionalinventories.compatibility.CompatWrapper
onServerStarted
-
Method Details
-
getFirst
Gets the first element of a list.- Type Parameters:
E- the type of elements in the list- Parameters:
list- the list to get the first element from- Returns:
- the retrieved element
- Throws:
NoSuchElementException- if the list is empty
-
getLast
Gets the last element of a list.- Type Parameters:
E- the type of elements in the list- Parameters:
list- the list to get the last element from- Returns:
- the retrieved element
- Throws:
NoSuchElementException- if the list is empty
-
removeFirst
Removes and returns the first element of a list.- Type Parameters:
E- the type of elements in the list- Parameters:
list- the list to remove the first element from- Returns:
- the removed element
- Throws:
NoSuchElementException- if the list is empty
-
removeLast
Removes and returns the last element of a list.- Type Parameters:
E- the type of elements in the list- Parameters:
list- the list to remove the last element from- Returns:
- the removed element
- Throws:
NoSuchElementException- if the list is empty
-