Package com.sun.speech.freetts

# Interface FeatureSet

All Superinterfaces:
  `Dumpable`

All Known Implementing Classes:
  `FeatureSetImpl`, `Utterance`

public interface FeatureSet extends Dumpable
Represents the abstract interface to an entity that has a set of features. Provides interfaces to set and get the name/value pairs as well as providing a set of convenience methods for setting and retrieving values of a particular type.

## Method Summary

Modifier and Type
Method
Description
`void`
`dump(PrintWriter output, int pad, String title)`
Dumps the FeatureSet in textual form.
`float`
`getFloat(String name)`
Convenience method that returns the named feature as a float.
`int`
`getInt(String name)`
Convenience method that returns the named feature as an int.
`Object`
`getObject(String name)`
Returns the named feature as an object.
`String`
`getString(String name)`
Convenience method that returns the named feature as a string.
`boolean`
`isPresent(String name)`
Determines if the given feature is present.
`void`
`remove(String name)`
Removes the named feature from this set of features.
`void`
`setFloat(String name, float value)`
Convenience method that sets the named feature as a float
`void`
`setInt(String name, int value)`
Convenience method that sets the named feature as an int.
`void`
`setObject(String name, Object value)`
Sets the named feature .
`void`
`setString(String name, String value)`
Convenience method that sets the named feature as a String.

## Method Details

### isPresent

boolean isPresent(String name)
Determines if the given feature is present.

Parameters:
  `name` - the name of the feature of interest
Returns:
  true if the named feature is present

### remove

void remove(String name)
Removes the named feature from this set of features.

Parameters:
  `name` - the name of the feature of interest

### getString

String getString(String name)
Convenience method that returns the named feature as a string.

Parameters:
  `name` - the name of the feature
Returns:
  the value associated with the name or null if the value is not found
Throws:
  `ClassCastException` - if theassociated value is not a String

### getInt

int getInt(String name)
Convenience method that returns the named feature as an int.

Parameters:
  `name` - the name of the feature
Returns:
  the value associated with the name or null if the value is not found
Throws:
  `ClassCastException` - if the associated value is not an int

### getFloat

float getFloat(String name)
Convenience method that returns the named feature as a float.

Parameters:
  `name` - the name of the feature
Returns:
  the value associated with the name or null if the value is not found
Throws:
  `ClassCastException` - if the associated value is not a float.

### getObject

Object getObject(String name)
Returns the named feature as an object.

Parameters:
  `name` - the name of the feature
Returns:
  the value associated with the name or null if the value is not found

### setInt

void setInt(String name, int value)
Convenience method that sets the named feature as an int.

Parameters:
  `name` - the name of the feature
  `value` - the value of the feature

### setFloat

void setFloat(String name, float value)
Convenience method that sets the named feature as a float

Parameters:
  `name` - the name of the feature
  `value` - the value of the feature

### setString

void setString(String name, String value)
Convenience method that sets the named feature as a String.

Parameters:
  `name` - the name of the feature
  `value` - the value of the feature

### setObject

void setObject(String name, Object value)
Sets the named feature .

Parameters:
  `name` - the name of the feature
  `value` - the value of the feature

### dump

void dump(PrintWriter output, int pad, String title)
Dumps the FeatureSet in textual form.

Specified by:
  `dump` in interface `Dumpable`
Parameters:
  `output` - where to send the formatted output
  `pad` - the padding
  `title` - the title