org.foray.common.i18n
Class Script4a

java.lang.Object
  extended by org.foray.common.i18n.Script4a
All Implemented Interfaces:
org.axsl.common.i18n.Script

public final class Script4a
extends Object
implements org.axsl.common.i18n.Script

Script codes using the ISO-15924 standard.

See Also:
"http://unicode.org/iso15924/iso15924-codes.html"

Field Summary
static Script4a CYRILLIC
          The Cyrillic script.
static Script4a LATIN
          The Latin script.
static Script4a UNDETERMINED
          The script representing an undetermined value.
 
Method Summary
 boolean equals(Object other)
           
static Script4a findFromAlpha(String alphaCode)
          Finds an instance of this class from a given alpha script code as defined in ISO 15924.
static Script4a findFromNumeric(int numericCode)
          Finds an instance of this class from a given alpha script code as defined in ISO 15924.
 String getAlphaCode()
           
 String getEnglishName()
           
 String getFrenchName()
           
 short getNumericCode()
           
 int hashCode()
           
static void register(Script4a script)
          Registers script information.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDETERMINED

public static final Script4a UNDETERMINED
The script representing an undetermined value.


LATIN

public static final Script4a LATIN
The Latin script.


CYRILLIC

public static final Script4a CYRILLIC
The Cyrillic script.

Method Detail

getAlphaCode

public String getAlphaCode()
Specified by:
getAlphaCode in interface org.axsl.common.i18n.Script

getNumericCode

public short getNumericCode()
Specified by:
getNumericCode in interface org.axsl.common.i18n.Script

getEnglishName

public String getEnglishName()
Specified by:
getEnglishName in interface org.axsl.common.i18n.Script

getFrenchName

public String getFrenchName()
Specified by:
getFrenchName in interface org.axsl.common.i18n.Script

register

public static void register(Script4a script)
Registers script information.

Parameters:
script - The script to be registered.

findFromAlpha

public static Script4a findFromAlpha(String alphaCode)
Finds an instance of this class from a given alpha script code as defined in ISO 15924. This search is case-insensitive.

Parameters:
alphaCode - The 4-letter ISO 15924 code.
Returns:
The instance matching alphaCode, or null if the code is not registered.

findFromNumeric

public static Script4a findFromNumeric(int numericCode)
Finds an instance of this class from a given alpha script code as defined in ISO 15924.

Parameters:
numericCode - The numeric ISO 15924 code.
Returns:
The instance matching numericCode, or null if the code is not registered.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2017. All rights reserved.