standup.joke
Class InstantiationConstraintLexemeClause

java.lang.Object
  extended by standup.joke.InstantiationConstraintLexeme
      extended by standup.joke.InstantiationConstraintLexemeClause
All Implemented Interfaces:
InstantiationConstraint, JokeConstraint

public class InstantiationConstraintLexemeClause
extends InstantiationConstraintLexeme

An InstantiationConstraint that constrains a joke to make use of a specific Lexeme in its question.

Author:
Ruli Manurung

Field Summary
 
Fields inherited from class standup.joke.InstantiationConstraintLexeme
lex
 
Constructor Summary
InstantiationConstraintLexemeClause(Lexeme _lex)
           
 
Method Summary
 void handleSchema(SQLQuerySchema schemaSQLQuery)
          Modifies the given SQLQuerySchema to reflect this constraint.
 String toString()
           
 boolean validate(JokeStructure j)
          Returns true if the given JokeStructure satisfies this constraint, and false if not.
 
Methods inherited from class standup.joke.InstantiationConstraintLexeme
getSQLConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstantiationConstraintLexemeClause

public InstantiationConstraintLexemeClause(Lexeme _lex)
Method Detail

handleSchema

public void handleSchema(SQLQuerySchema schemaSQLQuery)
Description copied from interface: InstantiationConstraint
Modifies the given SQLQuerySchema to reflect this constraint.

Specified by:
handleSchema in interface InstantiationConstraint
Overrides:
handleSchema in class InstantiationConstraintLexeme

validate

public boolean validate(JokeStructure j)
Description copied from interface: JokeConstraint
Returns true if the given JokeStructure satisfies this constraint, and false if not.

Specified by:
validate in interface JokeConstraint
Overrides:
validate in class InstantiationConstraintLexeme
Parameters:
j - the JokeStructure being validated
Returns:
-- true if j satisfies this constraint, false otherwise.

toString

public String toString()
Overrides:
toString in class InstantiationConstraintLexeme