edu.gtts.sautrela.wfsa
Class WFSASet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<WFSA>
edu.gtts.sautrela.wfsa.WFSASet
- All Implemented Interfaces:
- java.lang.Iterable<WFSA>, java.util.Collection<WFSA>, java.util.Set<WFSA>
public class WFSASet
- extends java.util.AbstractSet<WFSA>
- implements java.util.Set<WFSA>
An Set of WFSA-s sharing the same Alphabet.
- Author:
- mpenagar
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
WFSASet
public WFSASet()
WFSASet
public WFSASet(org.xml.sax.InputSource is)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
iterator
public java.util.Iterator<WFSA> iterator()
- Specified by:
iterator in interface java.lang.Iterable<WFSA>- Specified by:
iterator in interface java.util.Collection<WFSA>- Specified by:
iterator in interface java.util.Set<WFSA>- Specified by:
iterator in class java.util.AbstractCollection<WFSA>
size
public int size()
- Specified by:
size in interface java.util.Collection<WFSA>- Specified by:
size in interface java.util.Set<WFSA>- Specified by:
size in class java.util.AbstractCollection<WFSA>
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getAlphabet
public Alphabet getAlphabet()
getWFSA
public WFSA getWFSA(java.lang.String name)
add
public boolean add(WFSA wfsa)
- Adds a WFSA to the Set.
- Specified by:
add in interface java.util.Collection<WFSA>- Specified by:
add in interface java.util.Set<WFSA>- Overrides:
add in class java.util.AbstractCollection<WFSA>
- Throws:
java.lang.UnsupportedOperationException - If the set is not empty and the
wfsa does not share the already existing Alphabet
toXML
public java.lang.String toXML()
main
public static void main(java.lang.String[] args)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException