Uses of Interface
java.lang.CharSequence
Package
Description
Provides utilities for operations on abstract syntax trees (AST).
Provides for system input and output through data streams,
serialization and the file system.
Provides classes that are fundamental to the design of the Java
programming language.
HTTP Client and WebSocket APIs
Defines buffers, which are containers for data, and provides an
overview of the other NIO packages.
Defines charsets, decoders, and encoders, for translating between
bytes and Unicode characters.
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
Provides classes and interfaces for handling text, dates, numbers,
and messages in a manner independent of natural languages.
The main API for dates, times, instants, and durations.
Provides classes to print and parse dates and times.
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Classes for matching character sequences against patterns specified
by regular expressions.
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
Facilities for declaring annotation processors and for
allowing annotation processors to communicate with an annotation processing
tool environment.
Types and hierarchies of packages comprising a Java language model, a model of the declarations and types of the Java
programming language.
Interfaces used to model elements of the Java programming language.
Utilities to assist in the processing of
program elements and
types.
Provides classes and interfaces that deal with editable and noneditable text
components.
Provides interfaces for tools which can be invoked from a program,
for example, compilers.
-
Uses of CharSequence in com.sun.source.util
Modifier and TypeMethodDescriptionParameterNameProvider.getParameterName(VariableElement parameter)
Infer a parameter name for the given parameter.Modifier and TypeMethodDescriptionabstract void
DocTrees.printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
Prints a message of the specified kind at the location of the tree within the provided compilation unitabstract void
Trees.printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
Prints a message of the specified kind at the location of the tree within the provided compilation unit -
Uses of CharSequence in java.io
Modifier and TypeMethodDescriptionCharArrayWriter.append(CharSequence csq)
Appends the specified character sequence to this writer.CharArrayWriter.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer.PrintStream.append(CharSequence csq)
Appends the specified character sequence to this output stream.PrintStream.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this output stream.PrintWriter.append(CharSequence csq)
Appends the specified character sequence to this writer.PrintWriter.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer.StringWriter.append(CharSequence csq)
Appends the specified character sequence to this writer.StringWriter.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer.Writer.append(CharSequence csq)
Appends the specified character sequence to this writer.Writer.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this writer. -
Uses of CharSequence in java.lang
Modifier and TypeClassDescriptionclass
TheString
class represents character strings.class
A thread-safe, mutable sequence of characters.class
A mutable sequence of characters.Modifier and TypeMethodDescriptionCharSequence.subSequence(int start, int end)
Returns aCharSequence
that is a subsequence of this sequence.String.subSequence(int beginIndex, int endIndex)
Returns a character sequence that is a subsequence of this sequence.StringBuffer.subSequence(int start, int end)
Modifier and TypeMethodDescriptionAppendable.append(CharSequence csq)
Appends the specified character sequence to thisAppendable
.Appendable.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to thisAppendable
.StringBuffer.append(CharSequence s)
Appends the specifiedCharSequence
to this sequence.StringBuffer.append(CharSequence s, int start, int end)
StringBuilder.append(CharSequence s)
StringBuilder.append(CharSequence s, int start, int end)
static int
Character.codePointAt(CharSequence seq, int index)
Returns the code point at the given index of theCharSequence
.static int
Character.codePointBefore(CharSequence seq, int index)
Returns the code point preceding the given index of theCharSequence
.static int
Character.codePointCount(CharSequence seq, int beginIndex, int endIndex)
Returns the number of Unicode code points in the text range of the specified char sequence.static int
CharSequence.compare(CharSequence cs1, CharSequence cs2)
Compares twoCharSequence
instances lexicographically.boolean
String.contains(CharSequence s)
Returns true if and only if this string contains the specified sequence of char values.boolean
String.contentEquals(CharSequence cs)
Compares this string to the specifiedCharSequence
.StringBuffer.insert(int dstOffset, CharSequence s)
StringBuffer.insert(int dstOffset, CharSequence s, int start, int end)
StringBuilder.insert(int dstOffset, CharSequence s)
StringBuilder.insert(int dstOffset, CharSequence s, int start, int end)
static String
String.join(CharSequence delimiter, CharSequence... elements)
Returns a new String composed of copies of theCharSequence elements
joined together with a copy of the specifieddelimiter
.static String
String.join(CharSequence delimiter, Iterable<? extends CharSequence> elements)
Returns a newString
composed of copies of theCharSequence elements
joined together with a copy of the specifieddelimiter
.static int
Character.offsetByCodePoints(CharSequence seq, int index, int codePointOffset)
Returns the index within the given char sequence that is offset from the givenindex
bycodePointOffset
code points.static int
Integer.parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as a signedint
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static long
Long.parseLong(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as a signedlong
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static int
Integer.parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as an unsignedint
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.static long
Long.parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix)
Parses theCharSequence
argument as an unsignedlong
in the specifiedradix
, beginning at the specifiedbeginIndex
and extending toendIndex - 1
.String.replace(CharSequence target, CharSequence replacement)
Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.Modifier and TypeMethodDescriptionstatic String
String.join(CharSequence delimiter, Iterable<? extends CharSequence> elements)
Returns a newString
composed of copies of theCharSequence elements
joined together with a copy of the specifieddelimiter
.ModifierConstructorDescriptionStringBuffer(CharSequence seq)
Constructs a string buffer that contains the same characters as the specifiedCharSequence
.StringBuilder(CharSequence seq)
Constructs a string builder that contains the same characters as the specifiedCharSequence
. -
Uses of CharSequence in java.net.http
Modifier and TypeMethodDescriptiondefault CompletionStage<?>
WebSocket.Listener.onText(WebSocket webSocket, CharSequence data, boolean last)
A textual data has been received.WebSocket.sendText(CharSequence data, boolean last)
Sends textual data with characters from the given character sequence. -
Uses of CharSequence in java.nio
Modifier and TypeMethodDescriptionCharBuffer.append(CharSequence csq)
Appends the specified character sequence to this buffer (optional operation).CharBuffer.append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this buffer (optional operation).static CharBuffer
CharBuffer.wrap(CharSequence csq)
Wraps a character sequence into a buffer.static CharBuffer
CharBuffer.wrap(CharSequence csq, int start, int end)
Wraps a character sequence into a buffer. -
Uses of CharSequence in java.nio.charset
Modifier and TypeMethodDescriptionboolean
CharsetEncoder.canEncode(CharSequence cs)
Tells whether or not this encoder can encode the given character sequence. -
Uses of CharSequence in java.nio.file
Modifier and TypeMethodDescriptionstatic Path
Files.writeString(Path path, CharSequence csq, Charset cs, OpenOption... options)
Write a CharSequence to a file.static Path
Files.writeString(Path path, CharSequence csq, OpenOption... options)
Write a CharSequence to a file.Modifier and TypeMethodDescriptionstatic Path
Files.write(Path path, Iterable<? extends CharSequence> lines, Charset cs, OpenOption... options)
Write lines of text to a file.static Path
Files.write(Path path, Iterable<? extends CharSequence> lines, OpenOption... options)
Write lines of text to a file. -
Uses of CharSequence in java.text
Modifier and TypeMethodDescriptionstatic boolean
Normalizer.isNormalized(CharSequence src, Normalizer.Form form)
Determines if the given sequence of char values is normalized.static String
Normalizer.normalize(CharSequence src, Normalizer.Form form)
Normalize a sequence of char values. -
Uses of CharSequence in java.time
Modifier and TypeMethodDescriptionstatic Duration
Duration.parse(CharSequence text)
Obtains aDuration
from a text string such asPnDTnHnMn.nS
.static Instant
Instant.parse(CharSequence text)
Obtains an instance ofInstant
from a text string such as2007-12-03T10:15:30.00Z
.static LocalDate
LocalDate.parse(CharSequence text)
Obtains an instance ofLocalDate
from a text string such as2007-12-03
.static LocalDate
LocalDate.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofLocalDate
from a text string using a specific formatter.static LocalDateTime
LocalDateTime.parse(CharSequence text)
Obtains an instance ofLocalDateTime
from a text string such as2007-12-03T10:15:30
.static LocalDateTime
LocalDateTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofLocalDateTime
from a text string using a specific formatter.static LocalTime
LocalTime.parse(CharSequence text)
Obtains an instance ofLocalTime
from a text string such as10:15
.static LocalTime
LocalTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofLocalTime
from a text string using a specific formatter.static MonthDay
MonthDay.parse(CharSequence text)
Obtains an instance ofMonthDay
from a text string such as--12-03
.static MonthDay
MonthDay.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofMonthDay
from a text string using a specific formatter.static OffsetDateTime
OffsetDateTime.parse(CharSequence text)
Obtains an instance ofOffsetDateTime
from a text string such as2007-12-03T10:15:30+01:00
.static OffsetDateTime
OffsetDateTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofOffsetDateTime
from a text string using a specific formatter.static OffsetTime
OffsetTime.parse(CharSequence text)
Obtains an instance ofOffsetTime
from a text string such as10:15:30+01:00
.static OffsetTime
OffsetTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofOffsetTime
from a text string using a specific formatter.static Period
Period.parse(CharSequence text)
Obtains aPeriod
from a text string such asPnYnMnD
.static Year
Year.parse(CharSequence text)
Obtains an instance ofYear
from a text string such as2007
.static Year
Year.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofYear
from a text string using a specific formatter.static YearMonth
YearMonth.parse(CharSequence text)
Obtains an instance ofYearMonth
from a text string such as2007-12
.static YearMonth
YearMonth.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofYearMonth
from a text string using a specific formatter.static ZonedDateTime
ZonedDateTime.parse(CharSequence text)
Obtains an instance ofZonedDateTime
from a text string such as2007-12-03T10:15:30+01:00[Europe/Paris]
.static ZonedDateTime
ZonedDateTime.parse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance ofZonedDateTime
from a text string using a specific formatter. -
Uses of CharSequence in java.time.format
Modifier and TypeMethodDescriptionDateTimeFormatter.parse(CharSequence text)
Fully parses the text producing a temporal object.DateTimeFormatter.parse(CharSequence text, ParsePosition position)
Parses the text using this formatter, providing control over the text position.<T> T
DateTimeFormatter.parse(CharSequence text, TemporalQuery<T> query)
Fully parses the text producing an object of the specified type.DateTimeFormatter.parseBest(CharSequence text, TemporalQuery<?>... queries)
Fully parses the text producing an object of one of the specified types.DateTimeFormatter.parseUnresolved(CharSequence text, ParsePosition position)
Parses the text using this formatter, without resolving the result, intended for advanced use cases.ModifierConstructorDescriptionDateTimeParseException(String message, CharSequence parsedData, int errorIndex)
Constructs a new exception with the specified message.DateTimeParseException(String message, CharSequence parsedData, int errorIndex, Throwable cause)
Constructs a new exception with the specified message and cause. -
Uses of CharSequence in java.util
Modifier and TypeMethodDescriptionStringJoiner.add(CharSequence newElement)
Adds a copy of the givenCharSequence
value as the next element of theStringJoiner
value.StringJoiner.setEmptyValue(CharSequence emptyValue)
Sets the sequence of characters to be used when determining the string representation of thisStringJoiner
and no elements have been added yet, that is, when it is empty.ModifierConstructorDescriptionStringJoiner(CharSequence delimiter)
Constructs aStringJoiner
with no characters in it, with noprefix
orsuffix
, and a copy of the supplieddelimiter
.StringJoiner(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
Constructs aStringJoiner
with no characters in it using copies of the suppliedprefix
,delimiter
andsuffix
. -
Uses of CharSequence in java.util.regex
Modifier and TypeMethodDescriptionPattern.matcher(CharSequence input)
Creates a matcher that will match the given input against this pattern.static boolean
Pattern.matches(String regex, CharSequence input)
Compiles the given regular expression and attempts to match the given input against it.Matcher.reset(CharSequence input)
Resets this matcher with a new input sequence.String[]
Pattern.split(CharSequence input)
Splits the given input sequence around matches of this pattern.String[]
Pattern.split(CharSequence input, int limit)
Splits the given input sequence around matches of this pattern.Pattern.splitAsStream(CharSequence input)
Creates a stream from the given input sequence around matches of this pattern. -
Uses of CharSequence in java.util.stream
Modifier and TypeMethodDescriptionstatic Collector<CharSequence,?,String>
Collectors.joining()
Returns aCollector
that concatenates the input elements into aString
, in encounter order.static Collector<CharSequence,?,String>
Collectors.joining(CharSequence delimiter)
Returns aCollector
that concatenates the input elements, separated by the specified delimiter, in encounter order.static Collector<CharSequence,?,String>
Collectors.joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
Returns aCollector
that concatenates the input elements, separated by the specified delimiter, with the specified prefix and suffix, in encounter order.Modifier and TypeMethodDescriptionstatic Collector<CharSequence,?,String>
Collectors.joining(CharSequence delimiter)
Returns aCollector
that concatenates the input elements, separated by the specified delimiter, in encounter order.static Collector<CharSequence,?,String>
Collectors.joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
Returns aCollector
that concatenates the input elements, separated by the specified delimiter, with the specified prefix and suffix, in encounter order. -
Uses of CharSequence in javax.annotation.processing
Modifier and TypeMethodDescriptionFiler.createClassFile(CharSequence name, Element... originatingElements)
Creates a new class file, and returns an object to allow writing to it.Filer.createResource(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName, Element... originatingElements)
Creates a new auxiliary resource file for writing and returns a file object for it.Filer.createSourceFile(CharSequence name, Element... originatingElements)
Creates a new source file and returns an object to allow writing to it.Filer.getResource(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName)
Returns an object for reading an existing resource.void
Messager.printMessage(Diagnostic.Kind kind, CharSequence msg)
Prints a message of the specified kind.void
Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e)
Prints a message of the specified kind at the location of the element.void
Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)
Prints a message of the specified kind at the location of the annotation mirror of the annotated element.void
Messager.printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)
Prints a message of the specified kind at the location of the annotation value inside the annotation mirror of the annotated element. -
Uses of CharSequence in javax.lang.model
Modifier and TypeMethodDescriptionstatic boolean
SourceVersion.isIdentifier(CharSequence name)
Returns whether or notname
is a syntactically valid identifier (simple name) or keyword in the latest source version.static boolean
SourceVersion.isKeyword(CharSequence s)
Returns whether or nots
is a keyword, boolean literal, or null literal in the latest source version.static boolean
SourceVersion.isKeyword(CharSequence s, SourceVersion version)
Returns whether or nots
is a keyword, boolean literal, or null literal in the given source version.static boolean
SourceVersion.isName(CharSequence name)
Returns whether or notname
is a syntactically valid qualified name in the latest source version.static boolean
SourceVersion.isName(CharSequence name, SourceVersion version)
Returns whether or notname
is a syntactically valid qualified name in the given source version. -
Uses of CharSequence in javax.lang.model.element
Modifier and TypeMethodDescriptionboolean
Name.contentEquals(CharSequence cs)
Compares this name to the specifiedCharSequence
. -
Uses of CharSequence in javax.lang.model.util
Modifier and TypeMethodDescriptiondefault Set<? extends PackageElement>
Elements.getAllPackageElements(CharSequence name)
Returns all package elements with the given canonical name.default Set<? extends TypeElement>
Elements.getAllTypeElements(CharSequence name)
Returns all type elements with the given canonical name.default ModuleElement
Elements.getModuleElement(CharSequence name)
Returns a module element given its fully qualified name.Elements.getName(CharSequence cs)
Returns a name with the same sequence of characters as the argument.Elements.getPackageElement(CharSequence name)
Returns a package given its fully qualified name if the package is uniquely determinable in the environment.default PackageElement
Elements.getPackageElement(ModuleElement module, CharSequence name)
Returns a package given its fully qualified name, as seen from the given module.Elements.getTypeElement(CharSequence name)
Returns a type element given its canonical name if the type element is uniquely determinable in the environment.default TypeElement
Elements.getTypeElement(ModuleElement module, CharSequence name)
Returns a type element given its canonical name, as seen from the given module. -
Uses of CharSequence in javax.swing.text
Modifier and TypeClassDescriptionclass
A segment of a character array representing a fragment of text.Modifier and TypeMethodDescriptionSegment.subSequence(int start, int end)
Returns aCharSequence
that is a subsequence of this sequence. -
Uses of CharSequence in javax.tools
Modifier and TypeMethodDescriptionFileObject.getCharContent(boolean ignoreEncodingErrors)
Returns the character content of this file object, if available.ForwardingFileObject.getCharContent(boolean ignoreEncodingErrors)
SimpleJavaFileObject.getCharContent(boolean ignoreEncodingErrors)
This implementation always throws UnsupportedOperationException.