WebNMS TL1 API Release 4 Specification

com.adventnet.tl1.message
Class TL1Param

java.lang.Object
  |
  +--com.adventnet.tl1.message.TL1Param
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TL1Date, TL1Time

public class TL1Param
extends java.lang.Object
implements java.io.Serializable

This class represents a TL1 Parameter object. The two parameter types are,

Each TL1Param object consists of a name and a value. The name field is optional in the case of POSITION_DEFINED parameter.

See Also:
Serialized Form

Field Summary
static byte NAME_DEFINED
          Constant that represents a name defined parameter type.
static byte POSITION_DEFINED
          Constant that represents a position defined parameter type.
 
Constructor Summary
TL1Param()
          Default constructor that creates an instance of TL1Param object.
TL1Param(byte type, java.lang.String name, java.lang.String value)
          Constructor that creates an instance of TL1Param object and initializes the parameter type, name and value.
TL1Param(java.lang.String paramString)
           
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(TL1Param param)
          Compares the specified TL1Param object with this TL1Param object for equality.
 java.lang.String getParamName()
          Gets the name for this parameter object.
 java.lang.String getParamValue()
          Gets the parameter value for this parameter object.
 byte getType()
          Gets the type of this parameter object.
 void setParameter(java.lang.String paramString)
          Sets the TL1Param object as a paramname, paramvale using the given string.
 void setParamName(java.lang.String name)
          Sets the name with the given value for this parameter object.
 void setParamValue(java.lang.String paramValue)
          Sets the value of this parameter object with the given value.
 void setType(byte type)
          Sets the type of this parameter object.
 java.lang.String toExpandedString()
          Returns the string form of this TL1Param of the form name = value, where name is set by TCSMetadata.
 java.lang.String toString()
          Returns the string form of this TL1Param object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_DEFINED

public static final byte NAME_DEFINED
Constant that represents a name defined parameter type.

POSITION_DEFINED

public static final byte POSITION_DEFINED
Constant that represents a position defined parameter type.
Constructor Detail

TL1Param

public TL1Param()
Default constructor that creates an instance of TL1Param object.

TL1Param

public TL1Param(java.lang.String paramString)

TL1Param

public TL1Param(byte type,
                java.lang.String name,
                java.lang.String value)
Constructor that creates an instance of TL1Param object and initializes the parameter type, name and value.

Parameters:
type - byte representing parameter type. It can be either NAME_DEFINED or POSITION_DEFINED.
name - String representing the parameter name. In case of position defined type, this parameter name can be ignored.
value - String representing the parameter value.
Method Detail

setParameter

public void setParameter(java.lang.String paramString)
Sets the TL1Param object as a paramname, paramvale using the given string. If the string contains "=" then the left portion to the "=" is taken as the paramname and the right portion is taken as paramvalue. The paramString is of the form NAME_DEFINED(name=value) or POSITION_DEFINED(valuealone).
Parameters:
paramString - String of TL1Param.

setParamName

public void setParamName(java.lang.String name)
Sets the name with the given value for this parameter object.

Parameters:
name - String representing this parameter name.

getParamName

public java.lang.String getParamName()
Gets the name for this parameter object.

Returns:
String representing this parameter name.

setType

public void setType(byte type)
Sets the type of this parameter object.

Parameters:
type - byte representing parameter type. It can be either NAME_DEFINED or POSITION_DEFINED.

getType

public byte getType()
Gets the type of this parameter object.

Returns:
byte representing the parameter type. It can be either NAME_DEFINED or POSITION_DEFINED.

getParamValue

public java.lang.String getParamValue()
Gets the parameter value for this parameter object.

Returns:
Parameter value as a String.

setParamValue

public void setParamValue(java.lang.String paramValue)
Sets the value of this parameter object with the given value.

Parameters:
paramValue - String representing the paramvalue.

toString

public java.lang.String toString()
Returns the string form of this TL1Param object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this object.

toExpandedString

public java.lang.String toExpandedString()
Returns the string form of this TL1Param of the form name = value, where name is set by TCSMetadata.

Returns:
The string representation of this object

equals

public boolean equals(TL1Param param)
Compares the specified TL1Param object with this TL1Param object for equality.

Parameters:
param - TL1Param object to compare.

Returns:
true if this TL1Param object is the same as the TL1Param argument. Otherwise returns false.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

WebNMS TL1 API Release 4 Specification