Package ghidra.util.datastruct
Class ValueRange
java.lang.Object
ghidra.util.datastruct.ValueRange
- All Implemented Interfaces:
Comparable<ValueRange>
Associates an integer value with a numeric range.
-
Constructor Summary
ConstructorsConstructorDescriptionValueRange(long start, long end, int value) Constructor for numeric range with an associated value. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ValueRange otherRange) booleancontains(long index) Determines whether or not the indicated index is in the range.longgetEnd()Returns the end of the range.longgetStart()Returns the beginning of the range.intgetValue()Returns the value associated with the range.
-
Constructor Details
-
ValueRange
public ValueRange(long start, long end, int value) Constructor for numeric range with an associated value.- Parameters:
start- beginning of the rangeend- end of the rangevalue- the value to associate with the range.
-
-
Method Details
-
getStart
public long getStart()Returns the beginning of the range. -
getEnd
public long getEnd()Returns the end of the range. -
getValue
public int getValue()Returns the value associated with the range. -
contains
public boolean contains(long index) Determines whether or not the indicated index is in the range.- Parameters:
index- the index to check- Returns:
- true if the index is in this range.
-
compareTo
- Specified by:
compareToin interfaceComparable<ValueRange>
-