Public Member Functions | Private Attributes

com::nmt::mgp::MgpOption Class Reference

A message option. More...

List of all members.

Public Member Functions

 MgpOption (int key, String value)
 Construct a new option.
 MgpOption (int key, int value)
 Construct a new option.
 MgpOption (String key, String value)
 Construct a new option.
int getKey ()
 Returns the key for the option.
String getValue ()
 Returns the value for the option.
int getIntValue ()
 Returns the value for the option, interpreted as an integer.

Private Attributes

int key = -1
String value = null

Detailed Description

A message option.

The keys are the MGP_OPTION_* integers in Mgp.

The value is always stored as a string.


Constructor & Destructor Documentation

com::nmt::mgp::MgpOption::MgpOption ( int  key,
String  value 
) [inline]

Construct a new option.

Exceptions:
NullPointerException if value is null.
com::nmt::mgp::MgpOption::MgpOption ( int  key,
int  value 
) [inline]

Construct a new option.

com::nmt::mgp::MgpOption::MgpOption ( String  key,
String  value 
) [inline]

Construct a new option.

Exceptions:
NullPointerException if value is null.

Member Function Documentation

int com::nmt::mgp::MgpOption::getIntValue (  )  [inline]

Returns the value for the option, interpreted as an integer.

References value.

int com::nmt::mgp::MgpOption::getKey (  )  [inline]
String com::nmt::mgp::MgpOption::getValue (  )  [inline]

Member Data Documentation

int com::nmt::mgp::MgpOption::key = -1 [private]

Referenced by getKey().

String com::nmt::mgp::MgpOption::value = null [private]

Referenced by getIntValue(), and getValue().


The documentation for this class was generated from the following file: