laser.regularlanguage.util
Class DefaultRLFactory<L extends LabelInterface>

java.lang.Object
  extended by laser.regularlanguage.util.DefaultRLFactory<L>
Type Parameters:
L - The type of Labels used by the FSAs and REs.
All Implemented Interfaces:
RLFactory<L>
Direct Known Subclasses:
StringRLFactory

public class DefaultRLFactory<L extends LabelInterface>
extends java.lang.Object
implements RLFactory<L>

The DefaultRLFactory class helps users to convert between FSAs and REs.

NOTE: It assumes that the factory methods do not require any arguments and simply returns an array of length zero.

Author:
Heather M. Conboy (laser-software@cs.umass.edu)

Constructor Summary
DefaultRLFactory()
          Creates a new DefaultRLFactory.
 
Method Summary
 java.lang.Object[] getCreateFSAArgs(RE<L> theRE)
          Gets any required arguments for the FSA factory method from the given RE.
 java.lang.Object[] getCreateREArgs(FSAInterface<L> theFSA)
          Gets any required arguments for the RE factory method from the given FSA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRLFactory

public DefaultRLFactory()
Creates a new DefaultRLFactory.

Method Detail

getCreateFSAArgs

public java.lang.Object[] getCreateFSAArgs(RE<L> theRE)
Gets any required arguments for the FSA factory method from the given RE.

PRECONDITIONS:

Specified by:
getCreateFSAArgs in interface RLFactory<L extends LabelInterface>
Parameters:
theRE - The RE to use as a prototype
Returns:
Any required arguments for the equivalent FSA
See Also:
FSAFactoryInterface.createMutableFSAInterface(AlphabetInterface, Object[])

getCreateREArgs

public java.lang.Object[] getCreateREArgs(FSAInterface<L> theFSA)
Gets any required arguments for the RE factory method from the given FSA.

PRECONDITIONS:

Specified by:
getCreateREArgs in interface RLFactory<L extends LabelInterface>
Parameters:
theFSA - The FSA to use as a prototype
Returns:
Any required arguments for the equivalent RE
See Also:
REFactory.createRE(AlphabetInterface, TreeNode, Object[])