Class OrderedFsSet_array2.SubSet

  • All Implemented Interfaces:
    java.lang.Iterable<TOP>, java.util.Collection<TOP>, java.util.NavigableSet<TOP>, java.util.Set<TOP>, java.util.SortedSet<TOP>
    Enclosing class:
    OrderedFsSet_array2

    public static class OrderedFsSet_array2.SubSet
    extends java.lang.Object
    implements java.util.NavigableSet<TOP>
    This is used in a particular manner: only used to create iterators over that subset -- no insert/delete
    • Field Detail

      • fromElement

        private final TOP fromElement
      • toElement

        private final TOP toElement
      • fromInclusive

        private final boolean fromInclusive
      • toInclusive

        private final boolean toInclusive
      • firstPosInRange

        private final int firstPosInRange
      • lastPosInRange

        private final int lastPosInRange
      • firstElementInRange

        private final TOP firstElementInRange
      • lastElementInRange

        private final TOP lastElementInRange
      • sizeSubSet

        private int sizeSubSet
    • Constructor Detail

      • SubSet

        SubSet​(java.util.function.Supplier<OrderedFsSet_array2> theSet,
               TOP fromElement,
               boolean fromInclusive,
               TOP toElement,
               boolean toInclusive)
      • SubSet

        SubSet​(java.util.function.Supplier<OrderedFsSet_array2> theSet,
               TOP fromElement,
               boolean fromInclusive,
               TOP toElement,
               boolean toInclusive,
               boolean doTest,
               java.util.Comparator<TOP> comparator)
    • Method Detail

      • comparator

        public java.util.Comparator<? super TOP> comparator()
        Specified by:
        comparator in interface java.util.SortedSet<TOP>
      • first

        public TOP first()
        Specified by:
        first in interface java.util.SortedSet<TOP>
      • last

        public TOP last()
        Specified by:
        last in interface java.util.SortedSet<TOP>
      • size

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

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

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

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

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

        public boolean add​(TOP e)
        Specified by:
        add in interface java.util.Collection<TOP>
        Specified by:
        add in interface java.util.Set<TOP>
      • remove

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

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

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

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

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

        public void clear()
        Specified by:
        clear in interface java.util.Collection<TOP>
        Specified by:
        clear in interface java.util.Set<TOP>
      • lower

        public TOP lower​(TOP fs)
        Specified by:
        lower in interface java.util.NavigableSet<TOP>
      • floor

        public TOP floor​(TOP fs)
        Specified by:
        floor in interface java.util.NavigableSet<TOP>
      • ceiling

        public TOP ceiling​(TOP fs)
        Specified by:
        ceiling in interface java.util.NavigableSet<TOP>
      • higher

        public TOP higher​(TOP fs)
        Specified by:
        higher in interface java.util.NavigableSet<TOP>
      • pollFirst

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

        public TOP pollLast()
        Specified by:
        pollLast in interface java.util.NavigableSet<TOP>
      • iterator

        public java.util.Iterator<TOP> iterator()
        Specified by:
        iterator in interface java.util.Collection<TOP>
        Specified by:
        iterator in interface java.lang.Iterable<TOP>
        Specified by:
        iterator in interface java.util.NavigableSet<TOP>
        Specified by:
        iterator in interface java.util.Set<TOP>
      • descendingSet

        public java.util.NavigableSet<TOP> descendingSet()
        Specified by:
        descendingSet in interface java.util.NavigableSet<TOP>
      • descendingIterator

        public java.util.Iterator<TOP> descendingIterator()
        Specified by:
        descendingIterator in interface java.util.NavigableSet<TOP>
      • subSet

        public java.util.NavigableSet<TOP> subSet​(TOP fromElement1,
                                                  boolean fromInclusive1,
                                                  TOP toElement1,
                                                  boolean toInclusive1)
        Specified by:
        subSet in interface java.util.NavigableSet<TOP>
      • headSet

        public java.util.NavigableSet<TOP> headSet​(TOP toElement1,
                                                   boolean inclusive)
        Specified by:
        headSet in interface java.util.NavigableSet<TOP>
      • tailSet

        public java.util.NavigableSet<TOP> tailSet​(TOP fromElement1,
                                                   boolean inclusive)
        Specified by:
        tailSet in interface java.util.NavigableSet<TOP>
      • subSet

        public java.util.SortedSet<TOP> subSet​(TOP fromElement1,
                                               TOP toElement1)
        Specified by:
        subSet in interface java.util.NavigableSet<TOP>
        Specified by:
        subSet in interface java.util.SortedSet<TOP>
      • headSet

        public java.util.SortedSet<TOP> headSet​(TOP toElement1)
        Specified by:
        headSet in interface java.util.NavigableSet<TOP>
        Specified by:
        headSet in interface java.util.SortedSet<TOP>
      • tailSet

        public java.util.SortedSet<TOP> tailSet​(TOP fromElement1)
        Specified by:
        tailSet in interface java.util.NavigableSet<TOP>
        Specified by:
        tailSet in interface java.util.SortedSet<TOP>
      • isGtLast

        private boolean isGtLast​(TOP fs)
      • isGeLast

        private boolean isGeLast​(TOP fs)
      • isLtFirst

        private boolean isLtFirst​(TOP fs)
      • isLeFirst

        private boolean isLeFirst​(TOP fs)
      • isInRange

        private boolean isInRange​(TOP fs)
      • isInRangeLower

        private boolean isInRangeLower​(TOP fs)
      • isInRangeHigher

        private boolean isInRangeHigher​(TOP fs)