Class SourceSectionFilter.IndexRange
java.lang.Object
com.oracle.truffle.api.instrumentation.SourceSectionFilter.IndexRange
- Enclosing class:
SourceSectionFilter
Represents a range between two indices within a
source section
filter. Instances are immutable.- Since:
- 0.12
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbetween(int startIndex, int endIndex) Constructs a new index range between one a first index inclusive and a second index exclusive.byLength(int startIndex, int length) Constructs a new index range with a given first index inclusive and a given length.toString()
-
Method Details
-
between
Constructs a new index range between one a first index inclusive and a second index exclusive. Parameters must complystartIndex >= 0andstartIndex <= endIndex.- Parameters:
startIndex- the start index (inclusive)endIndex- the end index (exclusive)- Returns:
- a new index range
- Throws:
IllegalArgumentException- if parameter invariants are violated- Since:
- 0.12
-
byLength
Constructs a new index range with a given first index inclusive and a given length. Parameters must complystartIndex >= 0andlength >= 0.- Parameters:
startIndex- the start index (inclusive)length- the length of the range- Returns:
- a new index range
- Throws:
IllegalArgumentException- if parameter invariants are violated- Since:
- 0.12
-
toString
-