Sautrela

edu.gtts.sautrela.wfsa
Class WFSASet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<WFSA>
          extended by 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

Constructor Summary
WFSASet()
           
WFSASet(org.xml.sax.InputSource is)
           
 
Method Summary
 boolean add(WFSA wfsa)
          Adds a WFSA to the Set.
 Alphabet getAlphabet()
           
 java.lang.String getName()
           
 WFSA getWFSA(java.lang.String name)
           
 java.util.Iterator<WFSA> iterator()
           
static void main(java.lang.String[] args)
           
 void setName(java.lang.String name)
           
 int size()
           
 java.lang.String toXML()
           
 
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
 

Constructor Detail

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
Method Detail

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

Sautrela