@NotThreadSafe public class Codepoint extends Object implements IComparable<Codepoint>
| Modifier | Constructor and Description |
|---|---|
|
Codepoint(byte[] aBytes,
Charset aEncoding)
Create a Codepoint from a byte array with the specified charset encoding.
|
|
Codepoint(char cChar)
Create a codepoint from a single char
|
|
Codepoint(char[] aChars)
Create a Codepoint from a char array.
|
|
Codepoint(char cHigh,
char cLow)
Create a codepoint from a surrogate pair
|
|
Codepoint(CharSequence aCS)
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
|
protected |
Codepoint(int nValue,
boolean bDummyUnchecked)
Special protected constructor that allows creating special codepoints that
are invalid.
|
|
Codepoint(String sValue)
Create a Codepoint from a String.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(StringBuilder aSB) |
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() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisEqualTo, isGreaterOrEqualThan, isGreaterThan, isLowerOrEqualThan, isLowerThanpublic Codepoint(@Nonnull byte[] aBytes, @Nonnull Charset aEncoding)
aBytes - BytesaEncoding - Charsetpublic Codepoint(@Nonnull CharSequence aCS)
aCS - CharSequencepublic Codepoint(@Nonnull String sValue)
sValue - Stringpublic Codepoint(@Nonnull char[] aChars)
aChars - char arraypublic Codepoint(char cChar)
cChar - single charpublic Codepoint(char cHigh,
char cLow)
cHigh - high surrogatecLow - low surrogatepublic Codepoint(@Nonnull Codepoint aCodepoint)
aCodepoint - Object to copypublic Codepoint(@Nonnegative int nValue)
nValue - int valueprotected Codepoint(@Nonnegative int nValue, boolean bDummyUnchecked)
nValue - The codepoint value to be used. Must not be a valid codepoint.bDummyUnchecked - Dummy parameter to create a different signature@Nonnegative public final int getValue()
public final boolean isSupplementary()
true if this codepoint is supplementarypublic final boolean isLowSurrogate()
true if this codepoint is a low surrogatepublic final boolean isHighSurrogate()
true if this codepoint is a high surrogatepublic final char getHighSurrogate()
public final 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 final int getPlane()
public void appendTo(@Nonnull StringBuilder aSB)
public int compareTo(@Nonnull Codepoint o)
compareTo in interface Comparable<Codepoint>Copyright © 2014–2017 Philip Helger. All rights reserved.