edu.columbia.surge.hashImpl
Class APH

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--edu.columbia.surge.hashImpl.FDH
                    |
                    +--edu.columbia.surge.hashImpl.APH

public class APH
extends FDH
implements AP

This is the class that implements the AP interface and is implemented in the form of a HashMap as it is inherrited from the FDH class. This class consists of methods and constructors to set the required components of a AP. User can either use the APFactoryH class or directly use the constructor of this class to create instances of APH.

See Also:
APFactoryH, Serialized Form

Constructor Summary
APH()
          The default constructor.
APH(FD head)
          The constructor which takes in a head entry as parameter.
APH(java.lang.String lex)
          The constructor which takes in a lexical entry as parameter.
 
Method Summary
 void setHead(FD head)
          A method to set the head of the AP.
 void setLex(java.lang.String lex)
          A method to set the lexical entry of the AP
 
Methods inherited from class edu.columbia.surge.hashImpl.FDH
checkPath, checkPath, computePathDifference, getPath, getPath, putPath, putPath, putPathOverride, putPathOverride, stackToPath, stringToArray, toString, toString, toXML
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

APH

public APH()
The default constructor. It calls the inherrited constructor so that it can be hashed into the hash map. By default, any APH object must have a FD entry (cat ap) to symbolize that it is an AP object.

APH

public APH(java.lang.String lex)
    throws InvalidConstructorException
The constructor which takes in a lexical entry as parameter. If the lexical entry is entered incorrectly, an InvalidConstructorException will be thrown.
Parameters:
lex - the lexical entry represented as a string.
Throws:
InvalidConstructorException -  

APH

public APH(FD head)
    throws InvalidConstructorException
The constructor which takes in a head entry as parameter.
Parameters:
head - the head entry represented as a FD object
Throws:
InvalidConstructorException -  
Method Detail

setLex

public void setLex(java.lang.String lex)
A method to set the lexical entry of the AP
Specified by:
setLex in interface AP
Parameters:
lex - the lexical entry of the AP

setHead

public void setHead(FD head)
A method to set the head of the AP. This is used when the head cannot be represented by a single word. Otherwise, use setLex() instead.
Specified by:
setHead in interface AP
Parameters:
head - a FD representation of the head