类 TextRange

java.lang.Object
com.intellij.openapi.util.TextRange
所有已实现的接口:
Segment, Serializable

public class TextRange extends Object implements Segment, Serializable
A text range defined by start and end (exclusive) offset.
另请参阅:
  • ProperTextRange
  • fleet.com.intellij.util.text.TextRangeUtil
  • 序列化表格
  • 字段详细资料

    • EMPTY_RANGE

      public static final TextRange EMPTY_RANGE
    • EMPTY_ARRAY

      public static final TextRange[] EMPTY_ARRAY
  • 构造器详细资料

  • 方法详细资料

    • getStartOffset

      public final int getStartOffset()
      指定者:
      getStartOffset 在接口中 Segment
    • getEndOffset

      public final int getEndOffset()
      指定者:
      getEndOffset 在接口中 Segment
    • getLength

      public final int getLength()
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • contains

      public boolean contains(@NotNull @NotNull TextRange range)
    • contains

      public boolean contains(@NotNull @NotNull Segment range)
    • containsRange

      public boolean containsRange(int startOffset, int endOffset)
    • containsRange

      public static boolean containsRange(@NotNull @NotNull Segment outer, @NotNull @NotNull Segment inner)
    • containsOffset

      public boolean containsOffset(int offset)
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • contains

      public boolean contains(int offset)
    • substring

      @NotNull @Contract(pure=true) public @NotNull String substring(@NotNull @NotNull String str)
    • subSequence

      @NotNull public @NotNull CharSequence subSequence(@NotNull @NotNull CharSequence str)
    • cutOut

      @NotNull public @NotNull TextRange cutOut(@NotNull @NotNull TextRange subRange)
    • shiftRight

      @NotNull public @NotNull TextRange shiftRight(int delta)
    • shiftLeft

      @NotNull public @NotNull TextRange shiftLeft(int delta)
    • grown

      @NotNull public @NotNull TextRange grown(int lengthDelta)
    • from

      @NotNull public static @NotNull TextRange from(int offset, int length)
    • create

      @NotNull public static @NotNull TextRange create(int startOffset, int endOffset)
    • create

      @NotNull public static @NotNull TextRange create(@NotNull @NotNull Segment segment)
    • areSegmentsEqual

      public static boolean areSegmentsEqual(@NotNull @NotNull Segment segment1, @NotNull @NotNull Segment segment2)
    • replace

      @NotNull public @NotNull String replace(@NotNull @NotNull String original, @NotNull @NotNull String replacement)
    • intersects

      public boolean intersects(@NotNull @NotNull TextRange textRange)
    • intersects

      public boolean intersects(@NotNull @NotNull Segment textRange)
    • intersects

      public boolean intersects(int startOffset, int endOffset)
    • intersectsStrict

      public boolean intersectsStrict(@NotNull @NotNull TextRange textRange)
    • intersectsStrict

      public boolean intersectsStrict(int startOffset, int endOffset)
    • intersection

      public TextRange intersection(@NotNull @NotNull TextRange range)
    • isEmpty

      public boolean isEmpty()
    • union

      @NotNull public @NotNull TextRange union(@NotNull @NotNull TextRange textRange)
    • equalsToRange

      public boolean equalsToRange(int startOffset, int endOffset)
    • allOf

      @NotNull public static @NotNull TextRange allOf(@NotNull @NotNull String s)
    • assertProperRange

      public static void assertProperRange(@NotNull @NotNull Segment range) throws AssertionError
      抛出:
      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)