Class Iterators.Unique<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>
    Enclosing class:
    Iterators

    static final class Iterators.Unique<T>
    extends Iterators.Filter<T>
    Only return unique items.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<T> values  
    • Constructor Summary

      Constructors 
      Constructor Description
      Unique​(java.util.Iterator<? extends T> core)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean matches​(T value)
      Return true to retain the value.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • values

        private java.util.Set<T> values
    • Constructor Detail

      • Unique

        public Unique​(java.util.Iterator<? extends T> core)