public abstract class AbstractRestrictedCharacterSet extends Object implements RestrictedCharacterSet
| Modifier and Type | Field and Description |
|---|---|
protected List<Integer> |
codePointList |
protected Map<Integer,Integer> |
codeSet |
protected int |
codingLength |
protected int |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRestrictedCharacterSet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addValue(int codePoint) |
boolean |
equals(Object o) |
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 |
hashCode() |
int |
size()
Returns the number of entries for the set.
|
String |
toString() |
public int getCodePoint(int code)
RestrictedCharacterSetgetCodePoint in interface RestrictedCharacterSetcode - codepublic int getCode(int codePoint)
RestrictedCharacterSetNOT_FOUND == -1 for
invalid char.getCode in interface RestrictedCharacterSetcodePoint - character of interestpublic int size()
RestrictedCharacterSetsize in interface RestrictedCharacterSetpublic int getCodingLength()
RestrictedCharacterSetcodingLength = ceil( log2(N + 1) ) and N is the number of characters in the restricted character set.
getCodingLength in interface RestrictedCharacterSetRestrictedCharacterSet.size()protected void addValue(int codePoint)
Copyright © 2018 Siemens AG. All rights reserved.