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.
 
Constructor Summary
PlannerObjectTypeMap()
          Construct an empty type to object mapping.
 
Method Summary
 void addObject(PlannerObject object)
          Add an object to the mapping.
 java.util.Set getObjects(PlannerObjectType type)
          Gets the set of all objects that are of this type or any of its sub types.
 boolean isInstanceOf(PlannerObjectType type, PlannerObject object)
          Test if the object is of this type.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

PlannerObjectTypeMap

public PlannerObjectTypeMap()
Construct an empty type to object mapping.
Since:
ICF 0.0
Method Detail

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 against
object - the object to test
Returns:
true iff object is a sub type of this type.
Since:
ICF 0.0