Package edu.tufts.hrilab.action.db
Class OperatorDatabase
java.lang.Object
edu.tufts.hrilab.action.db.OperatorDatabase
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Protected so that only the Database can instantiate. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
addOperators
(Class[] operatorClasses) final OperatorDBEntry
getOperator
(String type) Lookup operator by type.final OperatorDBEntry
getOperator
(String type, List<Class<?>> inputRoleTypes) Lookup operator by type and roles.final OperatorDBEntry
getOperatorSilent
(String type, List<Class<?>> roles) Lookup operator by type and roles.
-
Constructor Details
-
OperatorDatabase
protected OperatorDatabase()Protected so that only the Database can instantiate.
-
-
Method Details
-
addOperators
-
addOperator
-
getOperator
Lookup operator by type. Returns last added operator if more than one operator with type.- Parameters:
type
- the type of the operator to look up- Returns:
- the requested operator (last added), if found, null otherwise
-
getOperator
Lookup operator by type and roles.- Parameters:
type
- the type of the operator to look up- Returns:
- the requested operator, if found, null otherwise
-
getOperatorSilent
Lookup operator by type and roles. Do not print error if lookup fails.- Parameters:
type
- the type of the operator to look up- Returns:
- the requested operator, if found, null otherwise
-