EXIficient

com.siemens.ct.exi.datatype.charset
Class AbstractRestrictedCharacterSet

java.lang.Object
  extended by com.siemens.ct.exi.datatype.charset.AbstractRestrictedCharacterSet
All Implemented Interfaces:
RestrictedCharacterSet
Direct Known Subclasses:
CodePointCharacterSet, XSDBase64CharacterSet, XSDBooleanCharacterSet, XSDDateTimeCharacterSet, XSDDecimalCharacterSet, XSDDoubleCharacterSet, XSDHexBinaryCharacterSet, XSDIntegerCharacterSet, XSDStringCharacterSet

public abstract class AbstractRestrictedCharacterSet
extends java.lang.Object
implements RestrictedCharacterSet

Version:
0.4.20090421
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Method Summary
 int getCode(int codePoint)
          Returns code for given code-point or NOT_FOUND == -1 for invalid char.
 int getCodePoint(int code)
          Retrieves the code-point for given code.
 int getCodingLength()
          Returns the number of bits to encode codes for the set.
 int size()
          Returns the number of entries for the set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCodePoint

public int getCodePoint(int code)
Description copied from interface: RestrictedCharacterSet
Retrieves the code-point for given code.

Specified by:
getCodePoint in interface RestrictedCharacterSet
Returns:
codePoint

getCode

public int getCode(int codePoint)
Description copied from interface: RestrictedCharacterSet
Returns code for given code-point or NOT_FOUND == -1 for invalid char.

Specified by:
getCode in interface RestrictedCharacterSet
Parameters:
codePoint - character of interest
Returns:
code

size

public int size()
Description copied from interface: RestrictedCharacterSet
Returns the number of entries for the set.

Specified by:
size in interface RestrictedCharacterSet
Returns:
number of entries

getCodingLength

public int getCodingLength()
Description copied from interface: RestrictedCharacterSet
Returns the number of bits to encode codes for the set.

codingLength = ceil( log2(N + 1) ) and N is the number of characters in the restricted character set.

Specified by:
getCodingLength in interface RestrictedCharacterSet
Returns:
number of entries
See Also:
RestrictedCharacterSet.size()

EXIficient