mobios.type
Class Alphabet
java.lang.Object
mobios.type.Alphabet
- All Implemented Interfaces:
- Serializable
public class Alphabet
- extends Object
- implements Serializable
An alphabet represents a collection of Symbol
s for a specific Sequence
type.
- Author:
- Willard
- See Also:
- Serialized Form
Constructor Summary |
Alphabet(Symbol[] alphabet,
int distinctSize)
Main constructor. |
Method Summary |
int |
distinctSize()
Two Symbol s may map to the same byteValue; this is used
to determine the number of distinct byteValues that an Alphabet has. |
Symbol |
get(int index)
|
int |
size()
|
Alphabet
public Alphabet(Symbol[] alphabet,
int distinctSize)
- Main constructor.
- Parameters:
alphabet
- An array of Symbol
objects that this alphabet is defined over.distinctSize
- the number of distinct byteValues that the symbols in the alphabet link to.
size
public int size()
- Returns:
- the size of the alphabet. May be greater than or equal to the distinctSize, but not smaller.
get
public Symbol get(int index)
- Parameters:
index
- the index of the desired Symbol
in the Symbol array.
- Returns:
- the desired
Symbol
.
distinctSize
public int distinctSize()
- Two
Symbol
s may map to the same byteValue; this is used
to determine the number of distinct byteValues that an Alphabet has.
See Symbol
for more info.
- Returns:
(C) 2002 - 2006 The MoBIoS Group