Class EmptyPriorityQueue<T>

  • All Implemented Interfaces:
    PriorityQueue<T>, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Queue<T>

    public final class EmptyPriorityQueue<T>
    extends java.lang.Object
    implements PriorityQueue<T>
    • Method Detail

      • removeTyped

        public boolean removeTyped​(T node)
        Description copied from interface: PriorityQueue
        Same as Collection.remove(Object) but typed using generics.
        Specified by:
        removeTyped in interface PriorityQueue<T>
      • containsTyped

        public boolean containsTyped​(T node)
        Description copied from interface: PriorityQueue
        Same as Collection.contains(Object) but typed using generics.
        Specified by:
        containsTyped in interface PriorityQueue<T>
      • priorityChanged

        public void priorityChanged​(T node)
        Description copied from interface: PriorityQueue
        Notify the queue that the priority for node has changed. The queue will adjust to ensure the priority queue properties are maintained.
        Specified by:
        priorityChanged in interface PriorityQueue<T>
        Parameters:
        node - An object which is in this queue and the priority may have changed.
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T>
      • toArray

        public <T1> T1[] toArray​(T1[] a)
        Specified by:
        toArray in interface java.util.Collection<T>
      • add

        public boolean add​(T t)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.Queue<T>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<T>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<T>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<T>
        Overrides:
        hashCode in class java.lang.Object
      • offer

        public boolean offer​(T t)
        Specified by:
        offer in interface java.util.Queue<T>
      • remove

        public T remove()
        Specified by:
        remove in interface java.util.Queue<T>
      • poll

        public T poll()
        Specified by:
        poll in interface java.util.Queue<T>
      • element

        public T element()
        Specified by:
        element in interface java.util.Queue<T>
      • peek

        public T peek()
        Specified by:
        peek in interface java.util.Queue<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object