Class SetAccumulator<T>

  • All Implemented Interfaces:
    Accumulator<T>, java.lang.Iterable<T>

    public class SetAccumulator<T>
    extends java.lang.Object
    implements Accumulator<T>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(T t)  
      void addAll​(java.util.Collection<T> collection)  
      java.util.Set<T> asSet()  
      boolean contains​(T t)  
      java.util.Collection<T> get()  
      java.util.Iterator<T> iterator()  
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • SetAccumulator

        public SetAccumulator()
      • SetAccumulator

        public SetAccumulator​(java.util.Set<T> set)
    • Method Detail

      • add

        public void add​(T t)
        Specified by:
        add in interface Accumulator<T>
      • addAll

        public void addAll​(java.util.Collection<T> collection)
        Specified by:
        addAll in interface Accumulator<T>
      • get

        public java.util.Collection<T> get()
        Specified by:
        get in interface Accumulator<T>
      • asSet

        public java.util.Set<T> asSet()
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object