Class RestrictedValueSortedMap.RestrictedSortedList

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, V element)  
      boolean add​(V e)  
      boolean addAll​(int index, java.util.Collection<? extends V> c)  
      boolean addAll​(java.util.Collection<? extends V> c)  
      int ceilingIndex​(V element)
      Returns the least index in this list whose element is greater than or equal to the specified element
      void clear()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(java.util.Collection<?> c)  
      int floorIndex​(V element)
      Returns the greatest index in this list whose element is less than or equal to the specified element
      V get​(int index)  
      int higherIndex​(V element)
      Returns the least index in this list whose element is strictly greater the specified element
      int indexOf​(java.lang.Object o)  
      boolean isEmpty()  
      java.util.Iterator<V> iterator()  
      int lastIndexOf​(java.lang.Object o)  
      java.util.ListIterator<V> listIterator()  
      java.util.ListIterator<V> listIterator​(int index)  
      int lowerIndex​(V element)
      Returns the greatest index in this list whose element is strictly less than the specified element
      V remove​(int index)  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean retainAll​(java.util.Collection<?> c)  
      V set​(int index, V element)  
      int size()  
      java.util.List<V> subList​(int fromIndex, int toIndex)  
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] a)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        equals, hashCode, replaceAll, sort, spliterator
    • Constructor Detail

      • RestrictedSortedList

        public RestrictedSortedList()
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<V>
        Specified by:
        size 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>
      • contains

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

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

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

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<V>
        Specified by:
        toArray 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.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.List<V>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<V>
        Specified by:
        containsAll in interface java.util.List<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.List<V>
      • addAll

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

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

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

        public void clear()
        Specified by:
        clear in interface java.util.Collection<V>
        Specified by:
        clear in interface java.util.List<V>
      • get

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

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

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

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

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<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>
      • subList

        public java.util.List<V> subList​(int fromIndex,
                                         int toIndex)
        Specified by:
        subList in interface java.util.List<V>
      • lowerIndex

        public int lowerIndex​(V element)
        Description copied from interface: SortedList
        Returns the greatest index in this list whose element is strictly less than the specified element
        Specified by:
        lowerIndex in interface SortedList<V>
        Parameters:
        element - the element to search for
        Returns:
        the index of the found element, or -1
      • floorIndex

        public int floorIndex​(V element)
        Description copied from interface: SortedList
        Returns the greatest index in this list whose element is less than or equal to the specified element

        If multiples of the specified element exist, this returns the least index of that element.

        Specified by:
        floorIndex in interface SortedList<V>
        Parameters:
        element - the element to search for
        Returns:
        the index of the found element, or -1
      • ceilingIndex

        public int ceilingIndex​(V element)
        Description copied from interface: SortedList
        Returns the least index in this list whose element is greater than or equal to the specified element

        If multiples of the specified element exist, this returns the greatest index of that element.

        Specified by:
        ceilingIndex in interface SortedList<V>
        Parameters:
        element - the element to search for
        Returns:
        the index of the found element, or -1
      • higherIndex

        public int higherIndex​(V element)
        Description copied from interface: SortedList
        Returns the least index in this list whose element is strictly greater the specified element
        Specified by:
        higherIndex in interface SortedList<V>
        Parameters:
        element - the element to search for
        Returns:
        the index of the found element, or -1