Class SkriptQueue
java.lang.Object
- All Implemented Interfaces:
AnyAmount, AnyProvider, Container<Object>, Serializable, Cloneable, Iterable<Object>, Collection<Object>, Deque<Object>, List<Object>, Queue<Object>, SequencedCollection<Object>
@ContainerType(Object.class)
public class SkriptQueue
extends LinkedList<@NotNull Object>
implements Deque<Object>, Queue<Object>, AnyAmount, Container<Object>
A queue of elements.
Elements will only be added to the queue if they are not null, with nothing happening if the elements are null.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Container
Container.ContainerType -
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<?> list) voidvoid@NotNull Numberamount()booleanObject[]removeRangeSafely(int fromIndex, int toIndex) Removes a range of elements from the queue.removeSafely(int i) @NotNull Object @NotNull []toArray()Methods inherited from class LinkedList
addAll, clear, clone, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, size, spliterator, toArrayMethods inherited from class AbstractSequentialList
iteratorMethods inherited from class AbstractList
equals, hashCode, listIterator, removeRange, subListMethods inherited from class AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toStringMethods inherited from interface AnyAmount
isEmpty, setAmount, supportsAmountChangeMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Deque
addAll, descendingIterator, element, getFirst, getLast, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, sizeMethods inherited from interface List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
SkriptQueue
public SkriptQueue()
-
-
Method Details
-
add
-
add
-
addFirst
-
addLast
-
contains
-
set
-
addAll
-
toArray
- Specified by:
toArrayin interfaceCollection<Object>- Specified by:
toArrayin interfaceList<Object>- Overrides:
toArrayin classLinkedList<@NotNull Object>
-
removeSafely
-
removeRangeSafely
Removes a range of elements from the queue. This will adjust the start/end of the range to be within the bounds of the queue, to avoid throwing an error.- Parameters:
fromIndex- The starting index (inclusive)toIndex- The ending index (exclusive)- Returns:
- The removed entries
-
amount
-
containerIterator
- Specified by:
containerIteratorin interfaceContainer<Object>- Returns:
- All element within this container in no particular order
-