Class SizeRestrictedAccumulatorWrapper<T>
java.lang.Object
ghidra.util.datastruct.SizeRestrictedAccumulatorWrapper<T>
- All Implemented Interfaces:
Accumulator<T>, Consumer<T>
-
Constructor Summary
ConstructorsConstructorDescriptionSizeRestrictedAccumulatorWrapper(Accumulator<T> accumulator, int maxSize) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddAll(Collection<T> collection) intReturns the number of items that have been added to this accumulator.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Accumulator
accept
-
Constructor Details
-
SizeRestrictedAccumulatorWrapper
Constructor.- Parameters:
accumulator- the accumulator to pass items tomaxSize- the maximum number of items this accumulator will hold
-
-
Method Details
-
add
- Specified by:
addin interfaceAccumulator<T>
-
addAll
- Specified by:
addAllin interfaceAccumulator<T>
-
getProgress
public int getProgress()Description copied from interface:AccumulatorReturns the number of items that have been added to this accumulator.- Specified by:
getProgressin interfaceAccumulator<T>- Returns:
- the number of items that have been added to this accumulator
-