org.speakright.sro
Class SROSubjectItem

java.lang.Object
  extended by org.speakright.core.ModelItemBase
      extended by 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

Nested Class Summary
 class SROSubjectItem.SubjectItemFormatter
           
 
Field Summary
 
Fields inherited from class org.speakright.core.ModelItemBase
m_formatter, m_isSet, m_name
 
Constructor Summary
SROSubjectItem(java.lang.String val, int num)
          Constructor
SROSubjectItem(java.lang.String val, int num, boolean outputNumber)
          Constructor
 
Method Summary
 void clear()
          clear the value back to its default, and clear the 'set' flag.
 java.lang.String get()
           
 int getNum()
           
 boolean getOutputNumber()
           
 java.lang.Object rawValue()
          get raw value as object.
 void set(java.lang.String val)
           
 void setNum(int num)
           
 void setOutputNumber(boolean b)
           
 
Methods inherited from class org.speakright.core.ModelItemBase
getFormattedItem, getFormatter, isSet, log, setFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SROSubjectItem

public SROSubjectItem(java.lang.String val,
                      int num)
Constructor

Parameters:
val - plural version of the noun
num - numerical value of the noun phrase

SROSubjectItem

public SROSubjectItem(java.lang.String val,
                      int num,
                      boolean outputNumber)
Constructor

Parameters:
val - plural version of the noun
num - numerical value of the noun phrase
outputNumber - whether to output the number as well as the noun.
Method Detail

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)