Package org.sonar.iac.docker.tree.impl
Class CompoundTextRange
- java.lang.Object
-
- org.sonar.iac.common.api.tree.impl.TextRange
-
- org.sonar.iac.docker.tree.impl.CompoundTextRange
-
public class CompoundTextRange extends TextRange
-
-
Constructor Summary
Constructors Constructor Description CompoundTextRange(List<TextRange> textRanges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextRangecomputeTextRangeAtIndex(int startIndex, String token)Provide the correctTextRange, which can extend a multiple lines.booleanequals(Object other)inthashCode()intnavigateToRangeAtIndex(org.sonar.iac.docker.tree.impl.CompoundTextRange.TextRangeIterator iterator, int index)
-
-
-
Method Detail
-
computeTextRangeAtIndex
public TextRange computeTextRangeAtIndex(int startIndex, String token)
Provide the correctTextRange, which can extend a multiple lines. It combines thestartIndexand thetokenlength to find which of thetextRangesare covered, to compute the correct single/multi lineTextRange.
-
navigateToRangeAtIndex
public int navigateToRangeAtIndex(org.sonar.iac.docker.tree.impl.CompoundTextRange.TextRangeIterator iterator, int index)
-
-