java.lang.Object
com.intellij.openapi.util.TextRange
- 所有已实现的接口:
Segment,Serializable
A text range defined by start and end (exclusive) offset.
- 另请参阅:
-
ProperTextRangefleet.com.intellij.util.text.TextRangeUtil- 序列化表格
-
字段概要
字段从接口继承的字段 com.intellij.openapi.util.Segment
BY_START_OFFSET_THEN_END_OFFSET -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @NotNull TextRangestatic booleanareSegmentsEqual(@NotNull Segment segment1, @NotNull Segment segment2) static voidassertProperRange(int startOffset, int endOffset, @NotNull Object message) static voidassertProperRange(@NotNull Segment range) static voidassertProperRange(@NotNull Segment range, @NotNull Object message) booleancontains(int offset) booleanbooleanbooleancontainsOffset(int offset) booleancontainsRange(int startOffset, int endOffset) static booleancontainsRange(@NotNull Segment outer, @NotNull Segment inner) static @NotNull TextRangecreate(int startOffset, int endOffset) static @NotNull TextRange@NotNull TextRangebooleanbooleanequalsToRange(int startOffset, int endOffset) static @NotNull TextRangefrom(int offset, int length) final intfinal intfinal int@NotNull TextRangegrown(int lengthDelta) inthashCode()intersection(@NotNull TextRange range) booleanintersects(int startOffset, int endOffset) booleanintersects(@NotNull Segment textRange) booleanintersects(@NotNull TextRange textRange) booleanintersectsStrict(int startOffset, int endOffset) booleanintersectsStrict(@NotNull TextRange textRange) booleanisEmpty()static booleanisProperRange(int startOffset, int endOffset) @NotNull String@NotNull TextRangeshiftLeft(int delta) @NotNull TextRangeshiftRight(int delta) @NotNull CharSequencesubSequence(@NotNull CharSequence str) @NotNull StringtoString()@NotNull TextRange
-
字段详细资料
-
EMPTY_RANGE
-
EMPTY_ARRAY
-
-
构造器详细资料
-
TextRange
public TextRange(int startOffset, int endOffset) -
TextRange
protected TextRange(int startOffset, int endOffset, boolean checkForProperTextRange) - 参数:
checkForProperTextRange-trueif offsets should be checked byassertProperRange(int, int, Object)- 另请参阅:
-
UnfairTextRange
-
-
方法详细资料
-
getStartOffset
public final int getStartOffset()- 指定者:
getStartOffset在接口中Segment
-
getEndOffset
public final int getEndOffset()- 指定者:
getEndOffset在接口中Segment
-
getLength
public final int getLength() -
equals
-
hashCode
public int hashCode() -
contains
-
contains
-
containsRange
public boolean containsRange(int startOffset, int endOffset) -
containsRange
-
containsOffset
public boolean containsOffset(int offset) -
toString
-
contains
public boolean contains(int offset) -
substring
-
subSequence
-
cutOut
-
shiftRight
-
shiftLeft
-
grown
-
from
-
create
-
create
-
areSegmentsEqual
-
replace
-
intersects
-
intersects
-
intersects
public boolean intersects(int startOffset, int endOffset) -
intersectsStrict
-
intersectsStrict
public boolean intersectsStrict(int startOffset, int endOffset) -
intersection
-
isEmpty
public boolean isEmpty() -
union
-
equalsToRange
public boolean equalsToRange(int startOffset, int endOffset) -
allOf
-
assertProperRange
- 抛出:
AssertionError
-
assertProperRange
public static void assertProperRange(@NotNull @NotNull Segment range, @NotNull @NotNull Object message) throws AssertionError - 抛出:
AssertionError
-
assertProperRange
public static void assertProperRange(int startOffset, int endOffset, @NotNull @NotNull Object message) -
isProperRange
public static boolean isProperRange(int startOffset, int endOffset)
-