|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.speech.freetts.FeatureSetImpl
Implementation of the FeatureSet interface.
Constructor Summary | |
FeatureSetImpl()
Creates a new empty feature set |
Method Summary | |
void |
dump(java.io.PrintWriter output,
int pad,
java.lang.String title)
Dumps the FeatureSet in textual form. |
void |
dump(java.io.PrintWriter output,
int pad,
java.lang.String title,
boolean showName)
Dumps the FeatureSet in textual form. |
float |
getFloat(java.lang.String name)
Convenience method that returns the named feature as a float. |
int |
getInt(java.lang.String name)
Convenience method that returns the named feature as a int. |
java.lang.Object |
getObject(java.lang.String name)
Returns the named feature as an object. |
java.lang.String |
getString(java.lang.String name)
Convenience method that returns the named feature as a string. |
boolean |
isPresent(java.lang.String name)
Determines if the given feature is present. |
void |
remove(java.lang.String name)
Removes the named feature from this set of features. |
void |
setFloat(java.lang.String name,
float value)
Convenience method that sets the named feature as a float. |
void |
setInt(java.lang.String name,
int value)
Convenience method that sets the named feature as a int. |
void |
setObject(java.lang.String name,
java.lang.Object value)
Sets the named feature. |
void |
setString(java.lang.String name,
java.lang.String value)
Convenience method that sets the named feature as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FeatureSetImpl()
Method Detail |
public boolean isPresent(java.lang.String name)
isPresent
in interface FeatureSet
name
- the name of the feature of interest
public void remove(java.lang.String name)
remove
in interface FeatureSet
name
- the name of the feature of interestpublic java.lang.String getString(java.lang.String name)
getString
in interface FeatureSet
name
- the name of the feature
java.lang.ClassCastException
- if theassociated value is not a
Stringpublic int getInt(java.lang.String name)
getInt
in interface FeatureSet
name
- the name of the feature
java.lang.ClassCastException
- if the associated value is not an int.public float getFloat(java.lang.String name)
getFloat
in interface FeatureSet
name
- the name of the feature
java.lang.ClassCastException
- if the associated value is not a
floatpublic java.lang.Object getObject(java.lang.String name)
getObject
in interface FeatureSet
name
- the name of the feature
public void setInt(java.lang.String name, int value)
setInt
in interface FeatureSet
name
- the name of the featurevalue
- the value of the featurepublic void setFloat(java.lang.String name, float value)
setFloat
in interface FeatureSet
name
- the name of the featurevalue
- the value of the featurepublic void setString(java.lang.String name, java.lang.String value)
setString
in interface FeatureSet
name
- the name of the featurevalue
- the value of the featurepublic void setObject(java.lang.String name, java.lang.Object value)
setObject
in interface FeatureSet
name
- the name of the featurevalue
- the value of the featurepublic void dump(java.io.PrintWriter output, int pad, java.lang.String title)
dump
in interface FeatureSet
output
- where to send the formatted outputpad
- the paddingtitle
- the titlepublic void dump(java.io.PrintWriter output, int pad, java.lang.String title, boolean showName)
output
- where to send the formatted outputpad
- the paddingtitle
- the titleshowName
- if true
, include the feature name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |