edu.cmu.cs.coral.icf.plan_based.planners
Class PlannerObjectTypeMap
java.lang.Object
|
+--edu.cmu.cs.coral.icf.plan_based.planners.PlannerObjectTypeMap
- public class PlannerObjectTypeMap
- extends java.lang.Object
Stores the mapping from PlannerObjectType's to PlannerObject's.
- Since:
- ICF 0.0
- Version:
- $Id$
Field Summary |
private java.util.Map |
typeToObjectMap
The mapping from PlannerType to sets of PlannerObject's. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
typeToObjectMap
private java.util.Map typeToObjectMap
- The mapping from PlannerType to sets of PlannerObject's. Each PlannerType maps to
a set of PlannerObject's that are of that exact type (no subtypes included).
- Since:
- ICF 0.0
PlannerObjectTypeMap
public PlannerObjectTypeMap()
- Construct an empty type to object mapping.
- Since:
- ICF 0.0
getObjects
public java.util.Set getObjects(PlannerObjectType type)
- Gets the set of all objects that are of this type or any of its sub types.
- Parameters:
type
- the type of objects to find- Returns:
- a set of all the objects that are of this type
- Since:
- ICF 0.0
addObject
public void addObject(PlannerObject object)
- Add an object to the mapping.
- Parameters:
object
- the object to add- Since:
- ICF 0.0
isInstanceOf
public boolean isInstanceOf(PlannerObjectType type,
PlannerObject object)
- Test if the object is of this type.
- Parameters:
type
- the type to test againstobject
- the object to test- Returns:
- true iff object is a sub type of this type.
- Since:
- ICF 0.0