Package edu.tufts.hrilab.action.db
Class OperatorDatabase
java.lang.Object
edu.tufts.hrilab.action.db.OperatorDatabase
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected so that only the Database can instantiate. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddOperators(Class[] operatorClasses) final OperatorDBEntrygetOperator(String type) Lookup operator by type.final OperatorDBEntrygetOperator(String type, List<Class<?>> inputRoleTypes) Lookup operator by type and roles.final OperatorDBEntrygetOperatorSilent(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
-