Class SizeRestrictedAccumulatorWrapper<T>

java.lang.Object
ghidra.util.datastruct.SizeRestrictedAccumulatorWrapper<T>
All Implemented Interfaces:
Accumulator<T>, Consumer<T>

public class SizeRestrictedAccumulatorWrapper<T> extends Object implements Accumulator<T>
  • Constructor Details

    • SizeRestrictedAccumulatorWrapper

      public SizeRestrictedAccumulatorWrapper(Accumulator<T> accumulator, int maxSize)
      Constructor.
      Parameters:
      accumulator - the accumulator to pass items to
      maxSize - the maximum number of items this accumulator will hold
  • Method Details

    • add

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

      public void addAll(Collection<T> collection)
      Specified by:
      addAll in interface Accumulator<T>
    • getProgress

      public int getProgress()
      Description copied from interface: Accumulator
      Returns the number of items that have been added to this accumulator.
      Specified by:
      getProgress in interface Accumulator<T>
      Returns:
      the number of items that have been added to this accumulator