Package org.jline.utils
Class AttributedString
java.lang.Object
org.jline.utils.AttributedCharSequence
org.jline.utils.AttributedString
- All Implemented Interfaces:
CharSequence
Attributed string.
Instances of this class are immutables.
Substrings are created without any memory copy.
- Author:
- Guillaume Nodet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jline.utils.AttributedCharSequence
AttributedCharSequence.ForceMode
-
Field Summary
Fields inherited from class org.jline.utils.AttributedCharSequence
TRUE_COLORS
-
Constructor Summary
ConstructorDescriptionAttributedString
(CharSequence str, int start, int end) AttributedString
(CharSequence str, int start, int end, AttributedStyle s) -
Method Summary
Modifier and TypeMethodDescriptionprotected char[]
buffer()
boolean
static AttributedString
static AttributedString
static AttributedString
static AttributedString
static AttributedString
int
hashCode()
static AttributedString
join
(AttributedString delimiter, Iterable<AttributedString> elements) static AttributedString
join
(AttributedString delimiter, AttributedString... elements) int
length()
protected int
offset()
static String
styleAt
(int index) styleMatches
(Pattern pattern, AttributedStyle style) subSequence
(int start, int end) Methods inherited from class org.jline.utils.AttributedCharSequence
charAt, codePointAt, codePointBefore, codePointCount, columnLength, columnSplitLength, columnSplitLength, columnSubSequence, contains, isHidden, print, println, rgbColor, roundColor, roundRgbColor, runLimit, runStart, substring, toAnsi, toAnsi, toAnsi, toAnsi, toAnsi, toAnsi, toAnsi, toAttributedString, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
EMPTY
-
NEWLINE
-
-
Constructor Details
-
AttributedString
-
AttributedString
-
AttributedString
-
AttributedString
-
-
Method Details
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
stripAnsi
-
buffer
protected char[] buffer()- Specified by:
buffer
in classAttributedCharSequence
-
offset
protected int offset()- Specified by:
offset
in classAttributedCharSequence
-
length
public int length() -
styleAt
- Specified by:
styleAt
in classAttributedCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
- Specified by:
subSequence
in classAttributedCharSequence
-
styleMatches
-
equals
-
hashCode
public int hashCode() -
join
-
join
public static AttributedString join(AttributedString delimiter, Iterable<AttributedString> elements)
-