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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jline.utils.AttributedCharSequence
AttributedCharSequence.ForceMode -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final char[]static final AttributedString(package private) final intstatic final AttributedString(package private) final int(package private) final long[]Fields inherited from class org.jline.utils.AttributedCharSequence
DISABLE_ALTERNATE_CHARSET, TRUE_COLORS -
Constructor Summary
ConstructorsConstructorDescriptionAttributedString(char[] buffer, long[] style, int start, int end) AttributedString(CharSequence str, int start, int end) AttributedString(CharSequence str, int start, int end, AttributedStyle s) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanarrEq(char[] a1, char[] a2, int s1, int s2, int l) private booleanarrEq(long[] a1, long[] a2, int s1, int s2, int l) protected char[]buffer()booleanstatic AttributedStringstatic AttributedStringstatic AttributedStringstatic AttributedStringstatic AttributedStringinthashCode()static AttributedStringjoin(AttributedString delimiter, Iterable<AttributedString> elements) static AttributedStringjoin(AttributedString delimiter, AttributedString... elements) intlength()protected intoffset()static StringstyleAt(int index) (package private) longstyleCodeAt(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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
buffer
final char[] buffer -
style
final long[] style -
start
final int start -
end
final int end -
EMPTY
-
NEWLINE
-
-
Constructor Details
-
AttributedString
-
AttributedString
-
AttributedString
-
AttributedString
-
AttributedString
AttributedString(char[] buffer, long[] style, int start, int end)
-
-
Method Details
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
fromAnsi
-
stripAnsi
-
buffer
protected char[] buffer()- Specified by:
bufferin classAttributedCharSequence
-
offset
protected int offset()- Specified by:
offsetin classAttributedCharSequence
-
length
public int length() -
styleAt
- Specified by:
styleAtin classAttributedCharSequence
-
styleCodeAt
long styleCodeAt(int index) - Overrides:
styleCodeAtin classAttributedCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence- Specified by:
subSequencein classAttributedCharSequence
-
styleMatches
-
equals
-
arrEq
private boolean arrEq(char[] a1, char[] a2, int s1, int s2, int l) -
arrEq
private boolean arrEq(long[] a1, long[] a2, int s1, int s2, int l) -
hashCode
public int hashCode() -
join
-
join
public static AttributedString join(AttributedString delimiter, Iterable<AttributedString> elements)
-