Class ItemContents

java.lang.Object
com.sun.speech.freetts.ItemContents

public class ItemContents extends Object
Contains the information that is shared between multiple items.
  • Constructor Details

    • ItemContents

      public ItemContents()
      Class Constructor.
  • Method Details

    • addItemRelation

      public void addItemRelation(String relationName, Item item)
      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 relation
      item - the item reference in the relation
    • removeItemRelation

      public void removeItemRelation(String relationName)
      Removes the relation/item mapping from this ItemContents.
      Parameters:
      relationName - the name of the relation/item to remove
    • showRelations

      public void showRelations()
    • getItemRelation

      public Item getItemRelation(String relationName)
      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

      public FeatureSet getFeatures()
      Returns the feature set for this item contents.
      Returns:
      the FeatureSet for this contents