standup.joke
Class InstantiationConstraintLexiconAllClause
java.lang.Object
standup.joke.InstantiationConstraintLexicon
standup.joke.InstantiationConstraintLexiconAll
standup.joke.InstantiationConstraintLexiconAllClause
- All Implemented Interfaces:
- InstantiationConstraint, JokeConstraint
public class InstantiationConstraintLexiconAllClause
- extends InstantiationConstraintLexiconAll
An InstantiationConstraint
that constrains a joke to use only
Lexeme
s from a given LexemeSet
as question instantiations.
- Author:
- Ruli Manurung
InstantiationConstraintLexiconAllClause
public InstantiationConstraintLexiconAllClause(LexemeSet lexs)
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 InstantiationConstraintLexiconAll
toString
public String toString()
- Overrides:
toString
in class InstantiationConstraintLexiconAll
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 InstantiationConstraintLexiconAll
- Parameters:
j
- the JokeStructure
being validated
- Returns:
- --
true
if j
satisfies this constraint,
false
otherwise.