|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.grammar.operations.AutomataCollection
public class AutomataCollection
Representation of a collection of automata. Singleton automata with equal strings are treated as equal, other automata are compared by object identity. (In other words, automata that are equal but not identical may be represented multiple times.)
Field Summary | |
---|---|
static AutomataCollection |
emptyAutomataCollection
Empty AutomataCollection (immutable). |
Constructor Summary | |
---|---|
AutomataCollection()
Constructs a new empty automata collection. |
|
AutomataCollection(AutomataCollection ac)
Constructs a new automata collection as a (shallow) copy of an existing one. |
Method Summary | |
---|---|
boolean |
add(Automaton a)
Adds an automaton. |
boolean |
addAll(AutomataCollection as)
Adds a collection of automata. |
Collection<Automaton> |
getCollection()
Returns the collection as a Collection<Automaton> . |
Iterator<Automaton> |
iterator()
Returns iterator. |
void |
makeImmutable()
Makes this collection immutable. |
boolean |
retainAll(AutomataCollection as)
Retains only the automata in this collection that are contained in the specified collection. |
String |
toString()
Returns a string describing this automata collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static AutomataCollection emptyAutomataCollection
AutomataCollection
(immutable).
Constructor Detail |
---|
public AutomataCollection()
public AutomataCollection(AutomataCollection ac)
Method Detail |
---|
public boolean add(Automaton a)
a
- automaton to add
public boolean addAll(AutomataCollection as)
as
- automata to add
public Collection<Automaton> getCollection()
Collection<Automaton>
.
public Iterator<Automaton> iterator()
iterator
in interface Iterable<Automaton>
public void makeImmutable()
UnsupportedOperationException
.
public boolean retainAll(AutomataCollection as)
as
- automata to be retained (non-null)
public String toString()
toString
in class Object
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |