Package com.sun.speech.freetts

# 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 Summary

Constructors
Constructor
Description
`ItemContents()`
Class Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addItemRelation(String relationName, Item item)`
Adds the given item to the set of relations.
`FeatureSet`
`getFeatures()`
Returns the feature set for this item contents.
`Item`
`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`
`showRelations()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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