Package ghidra.util.datastruct
Class CallbackAccumulator<T>
java.lang.Object
ghidra.util.datastruct.CallbackAccumulator<T>
- Type Parameters:
T- the type of the item being accumulated
- All Implemented Interfaces:
Accumulator<T>,Iterable<T>,Consumer<T>
An implementation of
Accumulator that allows clients to easily process items as
they arrive.
This class is different than normal accumulators in that the values are not
stored internally. As such, calls to get(), iterator() and
size() will reflect having no data.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.util.datastruct.Accumulator
accept, isEmpty, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CallbackAccumulator
Constructor- Parameters:
consumer- the consumer that will get called each time an item is added
-
-
Method Details
-
add
- Specified by:
addin interfaceAccumulator<T>
-
addAll
- Specified by:
addAllin interfaceAccumulator<T>
-
contains
- Specified by:
containsin interfaceAccumulator<T>
-
get
- Specified by:
getin interfaceAccumulator<T>
-
iterator
-
size
public int size()- Specified by:
sizein interfaceAccumulator<T>
-