Package ghidra.util
Enum Class AddressRangeIterators
- All Implemented Interfaces:
Serializable,Comparable<AddressRangeIterators>,Constable
Utilities for manipulating iterators over
AddressRanges. Notably, this allows the
creation of lazily computed set operations on AddressSetViews.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionstatic AddressRangeIteratorUtility for satisfying the type checker.protected static booleandoCheckStart(AddressRange range, Address start, boolean forward) static AddressRangeIteratorintersect(Iterator<AddressRange> a, Iterator<AddressRange> b, boolean forward) Create an iterator over the intersection between two address range iteratorsstatic AddressRangeIteratorsubtract(Iterator<AddressRange> a, Iterator<AddressRange> b, Address start, boolean forward) Create an iterator over the difference between two address range iteratorsstatic AddressRangeIteratorunion(Collection<Iterator<AddressRange>> iterators, boolean forward) Create an iterator over the union of address ranges in the given iteratorsstatic AddressRangeIteratorsReturns the enum constant of this class with the specified name.static AddressRangeIterators[]values()Returns an array containing the constants of this enum class, in the order they are declared.static AddressRangeIteratorxor(Iterator<AddressRange> a, Iterator<AddressRange> b, Address start, boolean forward) Create an iterator over the symmetric difference between two address range iterators
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
castOrWrap
Utility for satisfying the type checker. This just forwards the method calls so that anIteratoroverAddressRangecan be used where anAddressRangeIteratoris required. If only Java had type aliasing....- Parameters:
it- the iterator- Returns:
- the wrapper, or the same iterator if it is already an
AddressRangeIterator
-
union
public static AddressRangeIterator union(Collection<Iterator<AddressRange>> iterators, boolean forward) Create an iterator over the union of address ranges in the given iterators- Parameters:
iterators- the iterators to unionforward- true for forward iteration. The given iterators must all return ranges in the order indicated by this flag.- Returns:
- the iterator over the union
- See Also:
-
doCheckStart
-
subtract
public static AddressRangeIterator subtract(Iterator<AddressRange> a, Iterator<AddressRange> b, Address start, boolean forward) Create an iterator over the difference between two address range iterators- Parameters:
a- the minuendb- the subtrahendstart- the starting address, or nullforward- true for forward iteration. The given iterators must all return ranges in the order indicated by this flag.- Returns:
- the iterator over the difference
- See Also:
-
xor
public static AddressRangeIterator xor(Iterator<AddressRange> a, Iterator<AddressRange> b, Address start, boolean forward) Create an iterator over the symmetric difference between two address range iterators- Parameters:
a- the first iteratorb- the second iteratorstart- the starting address, or nullforward- true for forward iteration. The given iterators must all return ranges in the order indicated by this flag.- Returns:
- the iterator over the symmetric difference
- See Also:
-
intersect
public static AddressRangeIterator intersect(Iterator<AddressRange> a, Iterator<AddressRange> b, boolean forward) Create an iterator over the intersection between two address range iterators- Parameters:
a- the first iteratorb- the second iteratorforward- true for forward iteration. The given iterators must all return ranges in the order indicated by this flag.- Returns:
- the iterator over the symmetric difference
- See Also:
-