Class RestrictedCollections.RestrictedEntrySet.RestrictedIterator

    • Constructor Detail

      • RestrictedIterator

        public RestrictedIterator​(Iterator iter)
        Constructor.
        Parameters:
        iter - the Iterator to wrap
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements.
        Specified by:
        hasNext in interface Iterator
        Returns:
        true if the iterator has more elements
      • next

        public Object next()
        Returns the next element in the interation.
        Specified by:
        next in interface Iterator
        Returns:
        the next element in the iteration
      • remove

        public void remove()
        Removes from the underlying collection the last element returned by the iterator.
        Specified by:
        remove in interface Iterator
      • equals

        public boolean equals​(Object o)
        Compares the specified object with this Iterator for equality.
        Overrides:
        equals in class Object
        Parameters:
        o - object to be compared for equality with this Iterator
        Returns:
        true if the specified object is equal to this Iterator
      • hashCode

        public int hashCode()
        Returns the hash code value for this Iterator.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this Iterator
      • toString

        public String toString()
        Return a String description for this Iterator.
        Overrides:
        toString in class Object
        Returns:
        a String description of the Iterator