public class Language extends Element
| Constructor and Description |
|---|
Language()
Creates an empty language.
|
| Modifier and Type | Method and Description |
|---|---|
Language |
addLanguage(Language language)
Includes the set of sequences from another language in the set of
sequences in this language.
|
Language |
addSequence(Sequence sequence)
Adds a sequence to the set of sequences in this language.
|
static Language |
createBoundedPlus(Alphabet alphabet,
int length)
Creates a language containing all non-empty sequences up to a given
length, chosen from an alphabet.
|
static Language |
createBoundedStar(Alphabet alphabet,
int length)
Creates a language containing all sequences up to a given length,
chosen from an alphabet.
|
static Language |
createExactly(Alphabet alphabet,
int length)
Creates a language containing all sequences of a given length, chosen
from an alphabet.
|
java.util.Set<Sequence> |
getSequences()
Returns the set of sequences that constitute this language.
|
Language |
product(Alphabet alphabet)
Creates the product of this language and every event in an alphabet.
|
Language |
product(Language other)
Creates the product of this language and every sequence in another
language.
|
int |
size()
Returns the size of this language.
|
safeEquals, safeHashCode, semanticErrorpublic static Language createExactly(Alphabet alphabet, int length)
alphabet - the alphabet.length - the sequence length.public static Language createBoundedPlus(Alphabet alphabet, int length)
alphabet - the alphabet.length - the maximum sequence length.public static Language createBoundedStar(Alphabet alphabet, int length)
alphabet - the alphabet.length - the maximum sequence lengthpublic int size()
public java.util.Set<Sequence> getSequences()
public Language addSequence(Sequence sequence)
sequence - the sequence to add.public Language addLanguage(Language language)
language - the language to include.public Language product(Alphabet alphabet)
alphabet - the alphabet.public Language product(Language other)
other - the other language.