Package com.sun.speech.freetts
Class ItemContents
java.lang.Object
com.sun.speech.freetts.ItemContents
Contains the information that is shared between multiple items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItemRelation
(String relationName, Item item) Adds the given item to the set of relations.Returns the feature set for this item contents.getItemRelation
(String relationName) Given the name of a relation, returns the item the shares the same ItemContents.void
removeItemRelation
(String relationName) Removes the relation/item mapping from this ItemContents.void
-
Constructor Details
-
ItemContents
public ItemContents()Class Constructor.
-
-
Method Details
-
addItemRelation
Adds the given item to the set of relations. Whenever an item is added to a relation, it should add the name and the Item reference to this set of name/item mappings. This allows an item to find out the set of all relations that it is contained in.- Parameters:
relationName
- the name of the relationitem
- the item reference in the relation
-
removeItemRelation
Removes the relation/item mapping from this ItemContents.- Parameters:
relationName
- the name of the relation/item to remove
-
showRelations
public void showRelations() -
getItemRelation
Given the name of a relation, returns the item the shares the same ItemContents.- Parameters:
relationName
- the name of the relation of interest- Returns:
- the item associated with this ItemContents in the named relation, or null if it does not exist
-
getFeatures
Returns the feature set for this item contents.- Returns:
- the FeatureSet for this contents
-