|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.system.Template
A template defines the items and the properties/conditions that describe a new item. Some of the items and conditions are considered salient which means that they are more important than the others. The salient properties are usually filled in first before the system wastes time filling in less important slots.
Created: Thu Jan 3 11:23:22 2002
Copyright: Copyright (C) 2001 by MIT. All rights reserved.
| Constructor Summary | |
Template(BBItemType type)
|
|
| Method Summary | |
void |
addComponent(String varName,
BBItemType type,
boolean isSalient)
Add an object type to the template. |
void |
addConstraint(String varName,
BBItemType constraintType,
String[] argNames,
Object value,
boolean isSalient)
Add a constraint on the objects that make up this template. |
void |
bind(String var,
BBItem item)
Bind the named pattern variable to the given item. |
protected Object |
clone()
Copy this template. |
Template |
copy()
|
BBItem |
getBBItem(String varName)
Get the BBItem that is bound to varName. |
List |
getEmptySlotsFor(BBItemType type)
Get the empty slots that can hold an item of the given type. |
Collection |
getSlots()
|
BBItemType |
getType()
|
void |
unbind(String var)
Unbind the given pattern variable. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Template(BBItemType type)
| Method Detail |
public BBItem getBBItem(String varName)
public void addComponent(String varName,
BBItemType type,
boolean isSalient)
varName - The pattern variable to refer to the object within
the template.type - The type of object. This name should index into
a lookup table which specifies the full java class name.isSalient - Whether or not this item is a highly relevant
feature in this template.
public void addConstraint(String varName,
BBItemType constraintType,
String[] argNames,
Object value,
boolean isSalient)
varName - name of this constraintconstraintType - a BBItemType that identifies
the type of constraintargNames - the names of the variables that this constraint refers tovalue - the value of this constraint (boolean, realvaluedisSalient - whether or not this is a highly relevent
constraint on the components.
public void bind(String var,
BBItem item)
public void unbind(String var)
public Template copy()
protected Object clone()
clone in class Objectpublic List getEmptySlotsFor(BBItemType type)
type - a BBItemTypeList of slot namespublic Collection getSlots()
public BBItemType getType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||