|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.nmt.mgp.OptionHolder
public class OptionHolder
Container for message options.
| Constructor Summary | |
|---|---|
OptionHolder()
Public constructor. |
|
| Method Summary | |
|---|---|
void |
add(MgpOption option)
Adds an MgpOption. |
void |
delete(int key)
Deletes all options with a key that is equal to the specified key. |
void |
delete(MgpOption option)
Deletes specified option. |
int |
getIntValue(int key)
Gets the value of the option specified by key. |
int |
getIntValue(int key,
int defaultValue)
Gets the value of the option specified by key. |
MgpOption |
getOption(int key)
Gets the option specified by key. |
java.util.Vector |
getOptions()
Returns a vector containing all options in sequential order. |
java.lang.String |
getValue(int key)
Gets the value of the option specified by key. |
java.util.Vector |
getValues(int key)
Gets all the values of the option specified by key, as a Vector of Strings. |
static OptionHolder |
load(java.io.BufferedReader in)
Read all options from the supplied stream on the format specified by the Messaging Gateway Protocol (MGP). |
void |
write(java.io.Writer out)
Writes all options to the supplied stream on the format specified by the Messaging Gateway Protocol (MGP). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptionHolder()
| Method Detail |
|---|
public void add(MgpOption option)
option - the option to addpublic MgpOption getOption(int key)
key.
public java.lang.String getValue(int key)
public void delete(MgpOption option)
public void delete(int key)
public java.util.Vector getValues(int key)
public int getIntValue(int key,
int defaultValue)
If no option with the key exists, the default value is returned.
public int getIntValue(int key)
throws java.lang.NumberFormatException
If there are multiple occurances the first one will be used.
java.lang.NumberFormatException - if no option with the key exists.
public void write(java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Vector getOptions()
public static OptionHolder load(java.io.BufferedReader in)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||