Class DynamicValueSortedTreeMap.ValueSortedTreeMapValues

  • All Implemented Interfaces:
    java.lang.Iterable<V>, java.util.Collection<V>, java.util.Deque<V>, java.util.List<V>, java.util.Queue<V>
    Enclosing class:
    DynamicValueSortedTreeMap<K,​V>

    public class DynamicValueSortedTreeMap.ValueSortedTreeMapValues
    extends java.util.AbstractCollection<V>
    implements java.util.List<V>, java.util.Deque<V>
    A public view of the map as a list of values This view implements List and Deque, since an ordered collection ought to behave like a list, and since this implementation is meant to be used as a dynamic-cost priority queue. Generally, only the removal mutation methods are supported, all others are not supported.
    • Method Detail

      • add

        public void add​(int index,
                        V element)
        Specified by:
        add in interface java.util.List<V>
      • add

        public boolean add​(V e)
        Specified by:
        add in interface java.util.Collection<V>
        Specified by:
        add in interface java.util.Deque<V>
        Specified by:
        add in interface java.util.List<V>
        Specified by:
        add in interface java.util.Queue<V>
        Overrides:
        add in class java.util.AbstractCollection<V>
      • addAll

        public boolean addAll​(java.util.Collection<? extends V> c)
        Specified by:
        addAll in interface java.util.Collection<V>
        Specified by:
        addAll in interface java.util.Deque<V>
        Specified by:
        addAll in interface java.util.List<V>
        Overrides:
        addAll in class java.util.AbstractCollection<V>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends V> c)
        Specified by:
        addAll in interface java.util.List<V>
      • addFirst

        public void addFirst​(V e)
        Specified by:
        addFirst in interface java.util.Deque<V>
      • addLast

        public void addLast​(V e)
        Specified by:
        addLast in interface java.util.Deque<V>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<V>
        Specified by:
        clear in interface java.util.List<V>
        Overrides:
        clear in class java.util.AbstractCollection<V>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<V>
        Specified by:
        contains in interface java.util.Deque<V>
        Specified by:
        contains in interface java.util.List<V>
        Overrides:
        contains in class java.util.AbstractCollection<V>
      • descendingIterator

        public java.util.Iterator<V> descendingIterator()
        Specified by:
        descendingIterator in interface java.util.Deque<V>
      • element

        public V element()
        Specified by:
        element in interface java.util.Deque<V>
        Specified by:
        element in interface java.util.Queue<V>
      • get

        public V get​(int index)
        Specified by:
        get in interface java.util.List<V>
      • getFirst

        public V getFirst()
        Specified by:
        getFirst in interface java.util.Deque<V>
      • getLast

        public V getLast()
        Specified by:
        getLast in interface java.util.Deque<V>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<V>
        Specified by:
        isEmpty in interface java.util.List<V>
        Overrides:
        isEmpty in class java.util.AbstractCollection<V>
      • iterator

        public java.util.Iterator<V> iterator()
        Specified by:
        iterator in interface java.util.Collection<V>
        Specified by:
        iterator in interface java.util.Deque<V>
        Specified by:
        iterator in interface java.lang.Iterable<V>
        Specified by:
        iterator in interface java.util.List<V>
        Specified by:
        iterator in class java.util.AbstractCollection<V>
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<V>
      • listIterator

        public java.util.ListIterator<V> listIterator()
        Specified by:
        listIterator in interface java.util.List<V>
      • listIterator

        public java.util.ListIterator<V> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<V>
      • offer

        public boolean offer​(V e)
        Specified by:
        offer in interface java.util.Deque<V>
        Specified by:
        offer in interface java.util.Queue<V>
      • offerFirst

        public boolean offerFirst​(V e)
        Specified by:
        offerFirst in interface java.util.Deque<V>
      • offerLast

        public boolean offerLast​(V e)
        Specified by:
        offerLast in interface java.util.Deque<V>
      • peek

        public V peek()
        Specified by:
        peek in interface java.util.Deque<V>
        Specified by:
        peek in interface java.util.Queue<V>
      • peekFirst

        public V peekFirst()
        Specified by:
        peekFirst in interface java.util.Deque<V>
      • peekLast

        public V peekLast()
        Specified by:
        peekLast in interface java.util.Deque<V>
      • poll

        public V poll()
        Specified by:
        poll in interface java.util.Deque<V>
        Specified by:
        poll in interface java.util.Queue<V>
      • pollFirst

        public V pollFirst()
        Specified by:
        pollFirst in interface java.util.Deque<V>
      • pollLast

        public V pollLast()
        Specified by:
        pollLast in interface java.util.Deque<V>
      • pop

        public V pop()
        Specified by:
        pop in interface java.util.Deque<V>
      • push

        public void push​(V e)
        Specified by:
        push in interface java.util.Deque<V>
      • remove

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

        public V remove​(int index)
        Specified by:
        remove in interface java.util.List<V>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<V>
        Specified by:
        remove in interface java.util.Deque<V>
        Specified by:
        remove in interface java.util.List<V>
        Overrides:
        remove in class java.util.AbstractCollection<V>
      • removeFirst

        public V removeFirst()
        Specified by:
        removeFirst in interface java.util.Deque<V>
      • removeFirstOccurrence

        public boolean removeFirstOccurrence​(java.lang.Object o)
        Specified by:
        removeFirstOccurrence in interface java.util.Deque<V>
      • removeLast

        public V removeLast()
        Specified by:
        removeLast in interface java.util.Deque<V>
      • removeLastOccurrence

        public boolean removeLastOccurrence​(java.lang.Object o)
        Specified by:
        removeLastOccurrence in interface java.util.Deque<V>
      • set

        public V set​(int index,
                     V element)
        Specified by:
        set in interface java.util.List<V>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<V>
        Specified by:
        size in interface java.util.Deque<V>
        Specified by:
        size in interface java.util.List<V>
        Specified by:
        size in class java.util.AbstractCollection<V>
      • subList

        public java.util.List<V> subList​(int fromIndex,
                                         int toIndex)
        This operation is not supported
        Specified by:
        subList in interface java.util.List<V>