com.nmt.mgp
Class MgpOption

java.lang.Object
  extended by com.nmt.mgp.MgpOption

public class MgpOption
extends java.lang.Object

A message option. The keys are the MGP_OPTION_* integers in Mgp. The value is always stored as a string.


Constructor Summary
MgpOption(int key, int value)
          Construct a new option.
MgpOption(int key, java.lang.String value)
          Construct a new option.
MgpOption(java.lang.String key, java.lang.String value)
          Construct a new option.
 
Method Summary
 int getIntValue()
          Returns the value for the option, interpreted as an integer.
 int getKey()
          Returns the key for the option.
 java.lang.String getValue()
          Returns the value for the option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgpOption

public MgpOption(int key,
                 java.lang.String value)
Construct a new option.

Throws:
java.lang.NullPointerException - if value is null.

MgpOption

public MgpOption(int key,
                 int value)
Construct a new option.


MgpOption

public MgpOption(java.lang.String key,
                 java.lang.String value)
Construct a new option.

Throws:
java.lang.NullPointerException - if value is null.
Method Detail

getKey

public int getKey()
Returns the key for the option.


getValue

public java.lang.String getValue()
Returns the value for the option.


getIntValue

public int getIntValue()
Returns the value for the option, interpreted as an integer.