name.angoca.db2sa.core.syntax
Class GraphAnswer

Package class diagram package GraphAnswer
java.lang.Object
  extended by name.angoca.db2sa.core.syntax.GraphAnswer

public final class GraphAnswer
extends Object

Represents the answer of a given command. An answer is the phrase completed or the possible options of the current phrase.
Control Version

Version:
1.0.0 2009-07-19
Author:
Andres Gomez Casanova (AngocA)

Constructor Summary
GraphAnswer(List<Token> phrases, List<Token> options)
          Constructor that associates the phrase and the possible options.
 
Method Summary
 boolean equals(Object object)
           
 List<Token> getOptions()
          Returns the set of options of the current position.
 List<Token> getPhrases()
          Returns the set of phrases of the command.
 int hashCode()
           
 String toString()
          Returns a string representation of a graph answer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphAnswer

public GraphAnswer(List<Token> phrases,
                   List<Token> options)
Constructor that associates the phrase and the possible options.

Parameters:
phrases - phrase completed (could be the same that the user wrote.)
options - Possible options (0..n)
Method Detail

equals

public boolean equals(Object object)
Overrides:
equals in class Object

getOptions

public List<Token> getOptions()
Returns the set of options of the current position.

Returns:
set of options.

getPhrases

public List<Token> getPhrases()
Returns the set of phrases of the command.

Returns:
set of tokens that represents the command.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of a graph answer. The representation is: [phrases],{options}

Overrides:
toString in class Object
Returns:
String representation of a graph answer.
See Also:
Object.toString()


Andres Gomez Casanova (AngocA) Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.