Class IdentityUtils.DistinctFilter<E>

  • Type Parameters:
    E - type of elements to filter
    All Implemented Interfaces:
    java.util.function.Predicate<E>
    Enclosing class:
    IdentityUtils

    public static class IdentityUtils.DistinctFilter<E>
    extends java.lang.Object
    implements java.util.function.Predicate<E>
    Filter that returns true only for the first time specified element is tested. It may be used in Stream.filter(Predicate) to get a distinct stream in context of instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean test​(E e)  
      • Methods inherited from class java.lang.Object

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

        and, negate, or
    • Constructor Detail

      • DistinctFilter

        public DistinctFilter()
      • DistinctFilter

        public DistinctFilter​(int maxSize)
    • Method Detail

      • test

        public boolean test​(E e)
        Specified by:
        test in interface java.util.function.Predicate<E>