Class RestrictedValueSortedMap.RestrictedKeyListIterator

  • All Implemented Interfaces:
    java.util.Iterator<K>, java.util.ListIterator<K>
    Enclosing class:
    RestrictedValueSortedMap<K,​V>

    public class RestrictedValueSortedMap.RestrictedKeyListIterator
    extends java.lang.Object
    implements java.util.ListIterator<K>
    A list iterator suitable for List.listIterator(), etc., on the keys of a RestrictedValueSortedMap
    • Constructor Detail

      • RestrictedKeyListIterator

        public RestrictedKeyListIterator()
        Construct an iterator
      • RestrictedKeyListIterator

        public RestrictedKeyListIterator​(int start)
        Construct an iterator starting at a given index of the sub list.
        Parameters:
        start - initial iterator position
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<K>
        Specified by:
        hasNext in interface java.util.ListIterator<K>
      • next

        public K next()
        Specified by:
        next in interface java.util.Iterator<K>
        Specified by:
        next in interface java.util.ListIterator<K>
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface java.util.ListIterator<K>
      • previous

        public K previous()
        Specified by:
        previous in interface java.util.ListIterator<K>
      • nextIndex

        public int nextIndex()
        Specified by:
        nextIndex in interface java.util.ListIterator<K>
      • previousIndex

        public int previousIndex()
        Specified by:
        previousIndex in interface java.util.ListIterator<K>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<K>
        Specified by:
        remove in interface java.util.ListIterator<K>
      • set

        public void set​(K e)
        Specified by:
        set in interface java.util.ListIterator<K>
      • add

        public void add​(K e)
        Specified by:
        add in interface java.util.ListIterator<K>