org.speakright.sro
Class SROSubjectItem
java.lang.Object
org.speakright.core.ModelItemBase
org.speakright.sro.SROSubjectItem
- All Implemented Interfaces:
- java.io.Serializable, IModelItem
public class SROSubjectItem
- extends ModelItemBase
- implements java.io.Serializable
Item for saying the noun in a numerical noun phrase such the word "cars" in "two cars".
This SRO manages the singular/plural change on the noun "one car" vs "five cars"
- Author:
- IanRaeLaptop
- See Also:
- Serialized Form
|
Constructor Summary |
SROSubjectItem(java.lang.String val,
int num)
Constructor |
SROSubjectItem(java.lang.String val,
int num,
boolean outputNumber)
Constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SROSubjectItem
public SROSubjectItem(java.lang.String val,
int num)
- Constructor
- Parameters:
val - plural version of the nounnum - numerical value of the noun phrase
SROSubjectItem
public SROSubjectItem(java.lang.String val,
int num,
boolean outputNumber)
- Constructor
- Parameters:
val - plural version of the nounnum - numerical value of the noun phraseoutputNumber - whether to output the number as well as the noun.
rawValue
public java.lang.Object rawValue()
- Description copied from interface:
IModelItem
- get raw value as object. (for internal use)
- Specified by:
rawValue in interface IModelItem
- Returns:
clear
public void clear()
- Description copied from interface:
IModelItem
- clear the value back to its default, and clear the
'set' flag.
- Specified by:
clear in interface IModelItem
get
public java.lang.String get()
set
public void set(java.lang.String val)
getNum
public int getNum()
setNum
public void setNum(int num)
getOutputNumber
public boolean getOutputNumber()
setOutputNumber
public void setOutputNumber(boolean b)