ch.uzh.ifi.attempto.chartparser
Class CPAbstractOption

java.lang.Object
  extended by ch.uzh.ifi.attempto.chartparser.CPAbstractOption
All Implemented Interfaces:
AbstractOption

public class CPAbstractOption
extends java.lang.Object
implements AbstractOption

This class represents an abstract option for the chart parser. Such an abstract option consists of a category that represents possible next tokens and of a set of zero or more exceptions, also in the form of categories. The categories can be terminal or pre-terminal, but not non-terminal.

Author:
Tobias Kuhn

Method Summary
 boolean equals(java.lang.Object obj)
           
 Category getCategory()
          Returns the terminal or pre-terminal category that represents possible next tokens.
 java.lang.String getCategoryName()
          Returns the name of the category that represents possible next tokens.
 Category[] getExceptions()
          This method returns the exceptions.
 int hashCode()
           
 boolean isFulfilledBy(Category c)
          Returns true if the given category is fulfilled by this option.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCategory

public Category getCategory()
Returns the terminal or pre-terminal category that represents possible next tokens.

Returns:
The terminal or pre-terminal category.

getCategoryName

public java.lang.String getCategoryName()
Description copied from interface: AbstractOption
Returns the name of the category that represents possible next tokens.

Specified by:
getCategoryName in interface AbstractOption
Returns:
The category name.

getExceptions

public Category[] getExceptions()
This method returns the exceptions.

Returns:
The exceptions in the form of categories.

isFulfilledBy

public boolean isFulfilledBy(Category c)
Returns true if the given category is fulfilled by this option.

Parameters:
c - The category.
Returns:
true if it is fulfilled by this option.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2008-2012, AceWiki developers