EMGJavaAPI
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.
long getLongValue ()
 Returns the value for the option, interpreted as a long.

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:
NullPointerExceptionif value is null.

References key, and value.

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

Construct a new option.

References key, and value.

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

Construct a new option.

Exceptions:
NullPointerExceptionif value is null.

References value.


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]
long com::nmt::mgp::MgpOption::getLongValue ( ) [inline]

Returns the value for the option, interpreted as a long.

References value.

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

Member Data Documentation

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

Referenced by getKey(), and MgpOption().

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

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