public class Asn1DiscreteCharSet extends Asn1CharSet
mABitsPerChar, mUBitsPerChar
Constructor and Description |
---|
Asn1DiscreteCharSet(int[] charSet)
This constructor sets the permitted alphabet chracter set
|
Asn1DiscreteCharSet(java.lang.String charSet)
This constructor sets the permitted alphabet chracter set
|
Modifier and Type | Method and Description |
---|---|
int |
getCharAtIndex(int index)
This method will fetch the character from the permitted alphabet
at the given index.
|
int |
getCharIndex(int charValue)
This method will determine the index of the given character within
the permitted alphabet character set.
|
int |
getMaxValue()
This method will determine the maximum value of the given character within
the permitted alphabet character set.
|
protected boolean |
helpValidate(char c)
This function helps validate a character string by checking a character
to see if it is in the character set.
|
boolean |
validate(java.lang.String s)
This method will validate a character string by comparing its contents
to the character set.
|
getNumBitsPerChar
public Asn1DiscreteCharSet(java.lang.String charSet)
charSet
- Permitted alphabet character setpublic Asn1DiscreteCharSet(int[] charSet)
charSet
- Permitted alphabet character setpublic int getCharAtIndex(int index) throws Asn1ConsVioException
getCharAtIndex
in class Asn1CharSet
index
- Index of character within the character setAsn1ConsVioException
- Index not within define rangepublic int getCharIndex(int charValue) throws Asn1ConsVioException
getCharIndex
in class Asn1CharSet
charValue
- Character value to search forAsn1ConsVioException
- Character not found in setpublic int getMaxValue()
getMaxValue
in class Asn1CharSet
public boolean validate(java.lang.String s)
validate
in class Asn1CharSet
s
- The string to be validated.protected boolean helpValidate(char c)