Class ListAccumulator<T>

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

    public class ListAccumulator<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.List<T> asList()  
      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

      • ListAccumulator

        public ListAccumulator()
      • ListAccumulator

        public ListAccumulator​(java.util.List<T> list)
    • 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>
      • asList

        public java.util.List<T> asList()
      • 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