Klasse ObjectLinkedList<T>

Typparameter:
T - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
Iterable<T>, Collection<T>, List<T>, ObjectCollection<T>, ObjectIterable<T>, ObjectList<T>, ObjectPriorityDequeue<T>, ObjectPriorityQueue<T>, ISizeProvider, Stack<T>

public class ObjectLinkedList<T> extends AbstractObjectList<T> implements ObjectPriorityDequeue<T>, Stack<T>
A Type-Specific LinkedList implementation of list that is written to reduce (un)boxing

This implementation is optimized to improve how data is processed with interfaces like Stack and with optimized functions that use type-specific implementations for primitives and optimized logic for bulk actions.

  • Konstruktordetails

    • ObjectLinkedList

      public ObjectLinkedList()
      Creates a new LinkedList.
    • ObjectLinkedList

      @Deprecated public ObjectLinkedList(Collection<? extends T> c)
      Veraltet.
      Creates a new LinkedList a copy with the contents of the Collection.
      Parameter:
      c - the elements that should be added into the list
    • ObjectLinkedList

      public ObjectLinkedList(ObjectCollection<T> c)
      Creates a new LinkedList a copy with the contents of the Collection.
      Parameter:
      c - the elements that should be added into the list
    • ObjectLinkedList

      public ObjectLinkedList(ObjectList<T> l)
      Creates a new LinkedList a copy with the contents of the List.
      Parameter:
      l - the elements that should be added into the list
    • ObjectLinkedList

      public ObjectLinkedList(T... a)
      Creates a new LinkedList with a Copy of the array
      Parameter:
      a - the array that should be copied
    • ObjectLinkedList

      public ObjectLinkedList(T[] a, int length)
      Creates a new LinkedList with a Copy of the array with a custom length
      Parameter:
      a - the array that should be copied
      length - the desired length that should be copied
    • ObjectLinkedList

      public ObjectLinkedList(T[] a, int offset, int length)
      Creates a new LinkedList with a Copy of the array with in the custom range.
      Parameter:
      a - the array that should be copied
      offset - the starting offset of where the array should be copied from
      length - the desired length that should be copied
      Löst aus:
      IllegalStateException - if offset is smaller then 0
      IllegalStateException - if the offset + length exceeds the array length
  • Methodendetails

    • add

      public boolean add(T e)
      Beschreibung aus Klasse kopiert: AbstractObjectList
      A Type-Specific implementation of add function that delegates to List.add(int, Object)
      Angegeben von:
      add in Schnittstelle Collection<T>
      Angegeben von:
      add in Schnittstelle List<T>
      Setzt außer Kraft:
      add in Klasse AbstractObjectList<T>
    • add

      public void add(int index, T e)
      Angegeben von:
      add in Schnittstelle List<T>
    • addAll

      public boolean addAll(int index, ObjectCollection<T> c)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A Type-Specific addAll Function to reduce (un)boxing
      Angegeben von:
      addAll in Schnittstelle ObjectList<T>
      Parameter:
      index - index at which the specified elements is to be inserted
      c - the elements that need to be added
      Gibt zurück:
      true if the list was modified
      Siehe auch:
    • addAll

      public boolean addAll(int index, ObjectList<T> c)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A Type-Specific and optimized addAll function that allows a faster transfer of elements
      Angegeben von:
      addAll in Schnittstelle ObjectList<T>
      Parameter:
      index - index at which the specified elements is to be inserted
      c - the elements that need to be added
      Gibt zurück:
      true if the list was modified
    • addAll

      public boolean addAll(int index, Collection<? extends T> c)
      Angegeben von:
      addAll in Schnittstelle List<T>
    • enqueue

      public void enqueue(T e)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Method to insert a element into the PriorityQueue
      Angegeben von:
      enqueue in Schnittstelle ObjectPriorityQueue<T>
      Parameter:
      e - the element that should be inserted
    • enqueueFirst

      public void enqueueFirst(T e)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityDequeue
      Method to insert a element into the first Index instead of the last.
      Angegeben von:
      enqueueFirst in Schnittstelle ObjectPriorityDequeue<T>
      Parameter:
      e - the element that should be inserted into the first place
    • push

      public void push(T e)
      Beschreibung aus Schnittstelle kopiert: Stack
      Inserts a given Object on top of the stack
      Angegeben von:
      push in Schnittstelle Stack<T>
      Parameter:
      e - the Object to insert
    • addAll

      public boolean addAll(T[] e, int offset, int length)
      Beschreibung aus Schnittstelle kopiert: ObjectCollection
      A Type-Specific Array based addAll method to reduce the amount of Wrapping
      Angegeben von:
      addAll in Schnittstelle ObjectCollection<T>
      Parameter:
      e - the elements that should be added
      offset - where to start within the array
      length - how many elements of the array should be added
      Gibt zurück:
      if the collection was modified
    • addElements

      public void addElements(int from, T[] a, int offset, int length)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A function to fast add elements to the list
      Angegeben von:
      addElements in Schnittstelle ObjectList<T>
      Parameter:
      from - the index where the elements should be added into the list
      a - the elements that should be added
      offset - the start index of the array should be read from
      length - how many elements should be read from
    • getElements

      public T[] getElements(int from, T[] a, int offset, int length)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A function to fast fetch elements from the list
      Angegeben von:
      getElements in Schnittstelle ObjectList<T>
      Parameter:
      from - index where the list should be fetching elements from
      a - the array where the values should be inserted to
      offset - the startIndex of where the array should be written to
      length - the number of elements the values should be fetched from
      Gibt zurück:
      the inputArray
    • first

      public T first()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Shows the element that is to be returned next
      Angegeben von:
      first in Schnittstelle ObjectPriorityQueue<T>
      Gibt zurück:
      the first element in the Queue
    • last

      public T last()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityDequeue
      Peeking function for the last element
      Angegeben von:
      last in Schnittstelle ObjectPriorityDequeue<T>
      Gibt zurück:
      the Last Element within the dequeue without deleting it
    • getFirst

      public T getFirst()
      Beschreibung aus Schnittstelle kopiert: ObjectList
      Helper method that returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.
      Angegeben von:
      getFirst in Schnittstelle ObjectList<T>
      Gibt zurück:
      first element of the list
    • getLast

      public T getLast()
      Beschreibung aus Schnittstelle kopiert: ObjectList
      Helper method that returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.
      Angegeben von:
      getLast in Schnittstelle ObjectList<T>
      Gibt zurück:
      last element of the list
    • removeFirst

      public T removeFirst()
      Beschreibung aus Schnittstelle kopiert: ObjectList
      Helper method that removes and returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.
      Angegeben von:
      removeFirst in Schnittstelle ObjectList<T>
      Gibt zurück:
      first element of the list and removes it
    • removeLast

      public T removeLast()
      Beschreibung aus Schnittstelle kopiert: ObjectList
      Helper method that removes and returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.
      Angegeben von:
      removeLast in Schnittstelle ObjectList<T>
      Gibt zurück:
      last element of the list and removes it
    • peek

      public T peek(int index)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Peeking function to see whats inside the queue.
      Angegeben von:
      peek in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      peek in Schnittstelle Stack<T>
      Parameter:
      index - of the element that is requested to be viewed.
      Gibt zurück:
      the element that is requested
    • get

      public T get(int index)
      Angegeben von:
      get in Schnittstelle List<T>
    • contains

      public boolean contains(Object e)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Method to find out if a element is part of the queue
      Angegeben von:
      contains in Schnittstelle Collection<T>
      Angegeben von:
      contains in Schnittstelle List<T>
      Angegeben von:
      contains in Schnittstelle ObjectPriorityQueue<T>
      Setzt außer Kraft:
      contains in Klasse AbstractCollection<T>
      Parameter:
      e - the element that is searched for
      Gibt zurück:
      true if the element is in the queue
    • indexOf

      public int indexOf(Object o)
      Beschreibung aus Klasse kopiert: AbstractObjectList
      The IndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      indexOf in Schnittstelle List<T>
      Setzt außer Kraft:
      indexOf in Klasse AbstractObjectList<T>
      Parameter:
      o - the value that the index is searched for.
      Gibt zurück:
      index of the value that was searched for. -1 if not found
    • lastIndexOf

      public int lastIndexOf(Object o)
      Beschreibung aus Klasse kopiert: AbstractObjectList
      The lastIndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      lastIndexOf in Schnittstelle List<T>
      Setzt außer Kraft:
      lastIndexOf in Klasse AbstractObjectList<T>
      Parameter:
      o - the value that the index is searched for.
      Gibt zurück:
      the last index of the value that was searched for. -1 if not found
    • listIterator

      public ObjectListIterator<T> listIterator(int index)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A Type-Specific Iterator of listIterator
      Angegeben von:
      listIterator in Schnittstelle List<T>
      Angegeben von:
      listIterator in Schnittstelle ObjectList<T>
      Setzt außer Kraft:
      listIterator in Klasse AbstractObjectList<T>
      Siehe auch:
    • spliterator

      public ObjectSplititerator<T> spliterator()
      A Type Specific Type Splititerator to reduce boxing/unboxing
      Angegeben von:
      spliterator in Schnittstelle Collection<T>
      Angegeben von:
      spliterator in Schnittstelle Iterable<T>
      Angegeben von:
      spliterator in Schnittstelle List<T>
      Angegeben von:
      spliterator in Schnittstelle ObjectCollection<T>
      Angegeben von:
      spliterator in Schnittstelle ObjectIterable<T>
      Angegeben von:
      spliterator in Schnittstelle ObjectList<T>
      Gibt zurück:
      type specific splititerator
    • forEach

      public void forEach(Consumer<? super T> action)
      Angegeben von:
      forEach in Schnittstelle Iterable<T>
    • forEachIndexed

      public void forEachIndexed(IntObjectConsumer<T> action)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
      Angegeben von:
      forEachIndexed in Schnittstelle ObjectIterable<T>
      Angegeben von:
      forEachIndexed in Schnittstelle ObjectList<T>
      Parameter:
      action - The action to be performed for each element
    • forEach

      public <E> void forEach(E input, ObjectObjectConsumer<E,T> action)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
      Angegeben von:
      forEach in Schnittstelle ObjectIterable<T>
      Typparameter:
      E - the generic type of the Object
      Parameter:
      input - the object that should be included
      action - The action to be performed for each element
    • matchesAny

      public boolean matchesAny(Predicate<T> filter)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce stream usage that allows to filter for any matches.
      Angegeben von:
      matchesAny in Schnittstelle ObjectIterable<T>
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if any matches were found
    • matchesNone

      public boolean matchesNone(Predicate<T> filter)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce stream usage that allows to filter for no matches.
      Angegeben von:
      matchesNone in Schnittstelle ObjectIterable<T>
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if no matches were found
    • matchesAll

      public boolean matchesAll(Predicate<T> filter)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce stream usage that allows to filter for all matches.
      Angegeben von:
      matchesAll in Schnittstelle ObjectIterable<T>
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if all matches.
    • findFirst

      public T findFirst(Predicate<T> filter)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce stream usage that allows to filter for the first match.
      Angegeben von:
      findFirst in Schnittstelle ObjectIterable<T>
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the found value or the null equivalent variant.
    • reduce

      public <E> E reduce(E identity, BiFunction<E,T,E> operator)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle ObjectIterable<T>
      Typparameter:
      E - the keyType of elements maintained by this Collection
      Parameter:
      identity - the start value
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns identity if nothing was found
    • reduce

      public T reduce(ObjectObjectUnaryOperator<T,T> operator)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle ObjectIterable<T>
      Parameter:
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns null value if nothing was found
    • count

      public int count(Predicate<T> filter)
      Beschreibung aus Schnittstelle kopiert: ObjectIterable
      Helper function to reduce stream usage that allows to count the valid elements.
      Angegeben von:
      count in Schnittstelle ObjectIterable<T>
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the amount of Valid Elements
    • set

      public T set(int index, T e)
      Angegeben von:
      set in Schnittstelle List<T>
    • replaceAll

      public void replaceAll(UnaryOperator<T> o)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A function to replace all values in the list
      Angegeben von:
      replaceAll in Schnittstelle List<T>
      Angegeben von:
      replaceAll in Schnittstelle ObjectList<T>
      Parameter:
      o - the action to replace the values
    • onChanged

      public void onChanged()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Allows to notify the Queue to be revalidate its data
      Angegeben von:
      onChanged in Schnittstelle ObjectPriorityQueue<T>
    • comparator

      public Comparator<T> comparator()
      Angegeben von:
      comparator in Schnittstelle ObjectPriorityQueue<T>
      Gibt zurück:
      the sorter of the Queue, can be null
    • dequeue

      public T dequeue()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Method to extract a element from the PriorityQueue
      Angegeben von:
      dequeue in Schnittstelle ObjectPriorityQueue<T>
      Gibt zurück:
      a element from the Queue
    • dequeueLast

      public T dequeueLast()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityDequeue
      A Method to remove a element from the last place instead of the first
      Angegeben von:
      dequeueLast in Schnittstelle ObjectPriorityDequeue<T>
      Gibt zurück:
      the last element inserted
    • pop

      public T pop()
      Beschreibung aus Schnittstelle kopiert: Stack
      Removes the Object on top of the stack.
      Angegeben von:
      pop in Schnittstelle Stack<T>
      Gibt zurück:
      the element that is on top of the stack
    • removeFirst

      public boolean removeFirst(T e)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Removes the first found element in the queue
      Angegeben von:
      removeFirst in Schnittstelle ObjectPriorityQueue<T>
      Parameter:
      e - the element that should be removed
      Gibt zurück:
      if a searched element was removed
    • removeLast

      public boolean removeLast(T e)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      Removes the last found element in the queue
      Angegeben von:
      removeLast in Schnittstelle ObjectPriorityQueue<T>
      Parameter:
      e - the element that should be removed
      Gibt zurück:
      if a searched element was removed
    • swapRemove

      public T swapRemove(int index)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.
      Angegeben von:
      swapRemove in Schnittstelle ObjectList<T>
      Parameter:
      index - the index of the element to be removed
      Gibt zurück:
      the element previously at the specified position
    • swapRemove

      public boolean swapRemove(T e)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.
      Angegeben von:
      swapRemove in Schnittstelle ObjectList<T>
      Setzt außer Kraft:
      swapRemove in Klasse AbstractObjectList<T>
      Parameter:
      e - the element that should be removed
      Gibt zurück:
      true if the element was removed
    • remove

      public boolean remove(Object e)
      Angegeben von:
      remove in Schnittstelle Collection<T>
      Angegeben von:
      remove in Schnittstelle List<T>
      Setzt außer Kraft:
      remove in Klasse AbstractCollection<T>
    • remove

      public T remove(int index)
      Angegeben von:
      remove in Schnittstelle List<T>
    • removeElements

      public void removeElements(int from, int to)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      a function to fast remove elements from the list.
      Angegeben von:
      removeElements in Schnittstelle ObjectList<T>
      Parameter:
      from - the start index of where the elements should be removed from (inclusive)
      to - the end index of where the elements should be removed to (exclusive)
    • extractElements

      public <K> K[] extractElements(int from, int to, Class<K> type)
      Beschreibung aus Schnittstelle kopiert: ObjectList
      A function to fast extract elements out of the list, this removes the elements that were fetched.
      Angegeben von:
      extractElements in Schnittstelle ObjectList<T>
      Typparameter:
      K - the keyType of elements maintained by this Collection
      Parameter:
      from - the start index of where the elements should be fetched from (inclusive)
      to - the end index of where the elements should be fetched to (exclusive)
      type - the type of the OutputArray
      Gibt zurück:
      a array of the elements that were fetched
    • removeAll

      public boolean removeAll(Collection<?> c)
      Angegeben von:
      removeAll in Schnittstelle Collection<T>
      Angegeben von:
      removeAll in Schnittstelle List<T>
      Setzt außer Kraft:
      removeAll in Klasse AbstractCollection<T>
    • retainAll

      public boolean retainAll(Collection<?> c)
      Angegeben von:
      retainAll in Schnittstelle Collection<T>
      Angegeben von:
      retainAll in Schnittstelle List<T>
      Setzt außer Kraft:
      retainAll in Klasse AbstractCollection<T>
    • removeAll

      public boolean removeAll(ObjectCollection<T> c)
      Beschreibung aus Klasse kopiert: AbstractObjectCollection
      A Type-Specific implementation of removeAll. This Implementation iterates over all elements and removes them as they were found in the other collection.
      Angegeben von:
      removeAll in Schnittstelle ObjectCollection<T>
      Setzt außer Kraft:
      removeAll in Klasse AbstractObjectCollection<T>
      Parameter:
      c - the elements that should be deleted
      Gibt zurück:
      true if the collection was modified.
      Siehe auch:
    • removeAll

      public boolean removeAll(ObjectCollection<T> c, Consumer<T> r)
      Beschreibung aus Schnittstelle kopiert: ObjectCollection
      A Type-Specific removeAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.
      Angegeben von:
      removeAll in Schnittstelle ObjectCollection<T>
      Setzt außer Kraft:
      removeAll in Klasse AbstractObjectCollection<T>
      Parameter:
      c - the collection of elements that should be removed
      r - elements that got removed
      Gibt zurück:
      true if any element was removed
      Siehe auch:
    • retainAll

      public boolean retainAll(ObjectCollection<T> c)
      Beschreibung aus Klasse kopiert: AbstractObjectCollection
      A Type-Specific implementation of retainAll. This Implementation iterates over all elements and removes them as they were not found in the other collection.
      Angegeben von:
      retainAll in Schnittstelle ObjectCollection<T>
      Setzt außer Kraft:
      retainAll in Klasse AbstractObjectCollection<T>
      Parameter:
      c - the elements that should be kept
      Gibt zurück:
      true if the collection was modified.
      Siehe auch:
    • retainAll

      public boolean retainAll(ObjectCollection<T> c, Consumer<T> r)
      Beschreibung aus Schnittstelle kopiert: ObjectCollection
      A Type-Specific retainAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.
      Angegeben von:
      retainAll in Schnittstelle ObjectCollection<T>
      Setzt außer Kraft:
      retainAll in Klasse AbstractObjectCollection<T>
      Parameter:
      c - the collection of elements that should be kept
      r - elements that got removed
      Gibt zurück:
      true if any element was removed
      Siehe auch:
    • removeIf

      public boolean removeIf(Predicate<? super T> filter)
      Angegeben von:
      removeIf in Schnittstelle Collection<T>
    • toArray

      public Object[] toArray()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      A method to drop the contents of the Queue without clearing the queue
      Angegeben von:
      toArray in Schnittstelle Collection<T>
      Angegeben von:
      toArray in Schnittstelle List<T>
      Angegeben von:
      toArray in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      toArray in Schnittstelle Stack<T>
      Setzt außer Kraft:
      toArray in Klasse AbstractCollection<T>
      Gibt zurück:
      the contents of the queue into a seperate array.
    • toArray

      public <E> E[] toArray(E[] a)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      A method to drop the contents of the Queue without clearing the queue
      Angegeben von:
      toArray in Schnittstelle Collection<T>
      Angegeben von:
      toArray in Schnittstelle List<T>
      Angegeben von:
      toArray in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      toArray in Schnittstelle Stack<T>
      Setzt außer Kraft:
      toArray in Klasse AbstractCollection<T>
      Typparameter:
      E - the keyType of elements maintained by this Collection
      Parameter:
      a - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created array
      Gibt zurück:
      the contents of the queue into a seperate array.
    • toArray

      public <E> E[] toArray(IntFunction<E[]> action)
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      A Helper function that simplifies the process of creating a new Array.
      Angegeben von:
      toArray in Schnittstelle Collection<T>
      Angegeben von:
      toArray in Schnittstelle ObjectCollection<T>
      Angegeben von:
      toArray in Schnittstelle ObjectIterable<T>
      Angegeben von:
      toArray in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      toArray in Schnittstelle Stack<T>
      Typparameter:
      E - the returning arrayType
      Parameter:
      action - the array creation function
      Gibt zurück:
      an array containing all of the elements in this collection
      Siehe auch:
    • size

      public int size()
      Beschreibung aus Schnittstelle kopiert: Stack
      Provides the amount of elements currently in the stack
      Angegeben von:
      size in Schnittstelle Collection<T>
      Angegeben von:
      size in Schnittstelle ISizeProvider
      Angegeben von:
      size in Schnittstelle List<T>
      Angegeben von:
      size in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      size in Schnittstelle Stack<T>
      Angegeben von:
      size in Klasse AbstractCollection<T>
      Gibt zurück:
      the amount of elements that are stored in the PriorityQueue
    • clear

      public void clear()
      Beschreibung aus Schnittstelle kopiert: ObjectPriorityQueue
      clears all elements within the PriorityQueue, this does not resize the backing arrays
      Angegeben von:
      clear in Schnittstelle Collection<T>
      Angegeben von:
      clear in Schnittstelle List<T>
      Angegeben von:
      clear in Schnittstelle ObjectPriorityQueue<T>
      Angegeben von:
      clear in Schnittstelle Stack<T>
      Setzt außer Kraft:
      clear in Klasse AbstractCollection<T>
    • copy

      public ObjectLinkedList<T> copy()
      Beschreibung aus Schnittstelle kopiert: ObjectCollection
      A Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk
      Angegeben von:
      copy in Schnittstelle ObjectCollection<T>
      Angegeben von:
      copy in Schnittstelle ObjectList<T>
      Angegeben von:
      copy in Schnittstelle ObjectPriorityDequeue<T>
      Angegeben von:
      copy in Schnittstelle ObjectPriorityQueue<T>
      Setzt außer Kraft:
      copy in Klasse AbstractObjectList<T>
      Gibt zurück:
      a Shallow Copy of the collection