@NotThreadSafe public final class Codepoint extends Object implements Serializable, Comparable<Codepoint>
| Constructor and Description |
|---|
Codepoint(byte[] bytes,
Charset encoding)
Create a Codepoint from a byte array with the specified charset encoding.
|
Codepoint(char value)
Create a codepoint from a single char
|
Codepoint(char[] value)
Create a Codepoint from a char array.
|
Codepoint(char high,
char low)
Create a codepoint from a surrogate pair
|
Codepoint(CharSequence value)
Create a Codepoint from a CharSequence.
|
Codepoint(Codepoint aCodepoint)
Create a codepoint as a copy of another codepoint
|
Codepoint(int nValue)
Create a codepoint from a specific integer value
|
Codepoint(String value)
Create a Codepoint from a String.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Codepoint o) |
boolean |
equals(Object o) |
byte[] |
getAsBytes(Charset aCharset) |
char[] |
getAsChars() |
String |
getAsString() |
int |
getCharCount() |
char |
getHighSurrogate() |
char |
getLowSurrogate() |
int |
getPlane()
Plane 0 (0000–FFFF): Basic Multilingual Plane (BMP).
|
int |
getValue() |
int |
hashCode() |
boolean |
isAlpha() |
boolean |
isAlphaDigit() |
boolean |
isBidi() |
boolean |
isDigit() |
boolean |
isHighSurrogate() |
boolean |
isLowSurrogate() |
boolean |
isSupplementary() |
Codepoint |
next() |
Codepoint |
previous() |
public Codepoint(@Nonnull byte[] bytes, @Nonnull Charset encoding)
bytes - Bytesencoding - Charsetpublic Codepoint(@Nonnull CharSequence value)
value - CharSequencepublic Codepoint(@Nonnull String value)
value - Stringpublic Codepoint(@Nonnull char[] value)
value - char arraypublic Codepoint(char value)
value - single charpublic Codepoint(char high,
char low)
high - high surrogatelow - low surrogatepublic Codepoint(@Nonnull Codepoint aCodepoint)
aCodepoint - Object to copypublic Codepoint(@Nonnegative int nValue)
nValue - int value@Nonnegative public int getValue()
public boolean isSupplementary()
true if this codepoint is supplementarypublic boolean isLowSurrogate()
true if this codepoint is a low surrogatepublic boolean isHighSurrogate()
true if this codepoint is a high surrogatepublic char getHighSurrogate()
public char getLowSurrogate()
public boolean isBidi()
true if this Codepoint is a bidi control charpublic boolean isDigit()
public boolean isAlpha()
public boolean isAlphaDigit()
@Nonnull @ReturnsMutableCopy public char[] getAsChars()
@Nonnegative public int getCharCount()
public int getPlane()
public int compareTo(@Nonnull Codepoint o)
compareTo in interface Comparable<Codepoint>Copyright © 2014–2015 Philip Helger. All rights reserved.