public final class NumericShaper extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_RANGES
The Constant ALL_RANGES indicates all ranges.
|
static int |
ARABIC
The Constant ARABIC indicates the ARABIC range and decimal base.
|
static int |
BENGALI
The Constant BENGALI indicates the BENGALI range and decimal base.
|
static int |
DEVANAGARI
The Constant DEVANAGARI indicates the DEVANAGARI range and
decimal base.
|
static int |
EASTERN_ARABIC
The Constant EASTERN_ARABIC indicates the ARABIC range and
ARABIC_EXTENDED decimal base.
|
static int |
ETHIOPIC
The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.
|
static int |
EUROPEAN
The Constant EUROPEAN indicates the latin and extended range,
and latin decimal base.
|
static int |
GUJARATI
The Constant GUJARATI indicates the GUJARATI range and decimal base.
|
static int |
GURMUKHI
The Constant GURMUKHI indicates the GURMUKHI range and decimal base.
|
static int |
KANNADA
The Constant KANNADA indicates the KANNADA range and decimal base.
|
static int |
KHMER
The Constant KHMER indicates the KHMER range and decimal base.
|
static int |
LAO
The Constant LAO indicates the LAO range and decimal base.
|
static int |
MALAYALAM
The Constant MALAYALAM indicates the MALAYALAM range and decimal base.
|
static int |
MONGOLIAN
The Constant MONGOLIAN indicates the MONGOLIAN range and
decimal base.
|
static int |
MYANMAR
The Constant MYANMAR indicates the MYANMAR range and decimal base.
|
static int |
ORIYA
The Constant ORIYA indicates the ORIYA range and decimal base.
|
static int |
TAMIL
The Constant TAMIL indicates the TAMIL range and decimal base.
|
static int |
TELUGU
The Constant TELUGU indicates the TELUGU range and decimal base.
|
static int |
THAI
The Constant THAI indicates the THAI range and decimal base.
|
static int |
TIBETAN
The Constant TIBETAN indicates the TIBETAN range and decimal base.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
static NumericShaper |
getContextualShaper(int ranges)
Gets the NumericShaper for the specified unicode ranges.
|
static NumericShaper |
getContextualShaper(int ranges,
int defaultContext)
Gets the NumericShaper for the specified unicode ranges
and default unicode range.
|
int |
getRanges()
Gets the masks for all of the ranges supported by this NumericShaper,
packed into an int value using the logical OR logical operation
for multiple ranges:
NumericShaper.DEVANAGARI | NumericShaper.BENGALI.
|
static NumericShaper |
getShaper(int singleRange)
Gets a NumericShaper for the specified unicode range.
|
int |
hashCode()
Returns an integer hash code for this object.
|
boolean |
isContextual()
Checks if this NumericShaper is contextual (supporting
multiple script ranges) or not.
|
void |
shape(char[] text,
int start,
int count)
Transforms the encoding of the text, starting from the character
at index start and transforming count characters.
|
void |
shape(char[] text,
int start,
int count,
int context)
Transforms the encoding of the text, starting from the character
at index start and transforming count characters,
using the specified context.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
public static final int EUROPEAN
public static final int ARABIC
public static final int EASTERN_ARABIC
public static final int DEVANAGARI
public static final int BENGALI
public static final int GURMUKHI
public static final int GUJARATI
public static final int ORIYA
public static final int TAMIL
public static final int TELUGU
public static final int KANNADA
public static final int MALAYALAM
public static final int THAI
public static final int LAO
public static final int TIBETAN
public static final int MYANMAR
public static final int ETHIOPIC
public static final int KHMER
public static final int MONGOLIAN
public static final int ALL_RANGES
public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)public boolean equals(Object obj)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectobj - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.
public static NumericShaper getContextualShaper(int ranges, int defaultContext)
ranges - the unicode ranges.defaultContext - the default, starting context.public static NumericShaper getContextualShaper(int ranges)
ranges - the unicode ranges.public int getRanges()
public static NumericShaper getShaper(int singleRange)
singleRange - the specified unicode single range.public boolean isContextual()
public void shape(char[] text,
int start,
int count,
int context)
text - the text to be shaped.start - the start offset of the text.count - the number of characters to be shaped.context - the context to be used for shaping.public void shape(char[] text,
int start,
int count)
text - the text to be shaped.start - the start offset of the text.count - the number of characters to be shaped.