Package ghidra.util.datastruct
Class FilteringAccumulatorWrapper<T>
java.lang.Object
ghidra.util.datastruct.FilteringAccumulatorWrapper<T>
- Type Parameters:
T- the type of the accumulator
- All Implemented Interfaces:
Accumulator<T>,Iterable<T>
A class that allows clients to wrap a given accumulator, only adding elements that pass the
given filter.
-
Constructor Summary
ConstructorsConstructorDescriptionFilteringAccumulatorWrapper(Accumulator<T> accumulator, Predicate<T> passesFilterPredicate) Constructor. -
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
isEmpty, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FilteringAccumulatorWrapper
Constructor.- Parameters:
accumulator- the accumulator to pass items topassesFilterPredicate- the predicate that will return true for items that should be allowed to pass
-
-
Method Details
-
iterator
-
add
- Specified by:
addin interfaceAccumulator<T>
-
addAll
- Specified by:
addAllin interfaceAccumulator<T>
-
contains
- Specified by:
containsin interfaceAccumulator<T>
-
get
- Specified by:
getin interfaceAccumulator<T>
-
size
public int size()- Specified by:
sizein interfaceAccumulator<T>
-