← 返回首页
CharSequence (Java SE 26 & JDK 26)
JavaScript is disabled on your browser.
Contents  
  1. Description
  2. Method Summary
  3. Method Details
    1. length()
    2. charAt(int)
    3. isEmpty()
    4. subSequence(int, int)
    5. toString()
    6. chars()
    7. codePoints()
    8. compare(CharSequence, CharSequence)
    9. getChars(int, int, char[], int)
Hide sidebar  Show sidebar

Interface CharSequence

All Known Subinterfaces: Name, Utf8Entry All Known Implementing Classes: CharBuffer, Segment, String, StringBuffer, StringBuilder
public interface CharSequence
A CharSequence is a readable sequence of char values. This interface provides uniform, read-only access to many different kinds of char sequences. A char value represents a character in the Basic Multilingual Plane (BMP) or a surrogate. Refer to Unicode Character Representation for details.

This interface does not refine the general contracts of the equals and hashCode methods. The result of testing two objects that implement CharSequence for equality is therefore, in general, undefined. Each object may be implemented by a different class, and there is no guarantee that each class will be capable of testing its instances for equality with those of the other. It is therefore inappropriate to use arbitrary CharSequence instances as elements in a set or as keys in a map.

Since: 1.4

Scripting on this page tracks web page traffic, but does not change the content in any way.