atg.rest.util
Class NameValuePair

java.lang.Object
  extended by atg.rest.util.NameValuePair

public class NameValuePair
extends java.lang.Object

This class is mainly used to return name value pairs from methods. It allows for the two objects to be returned from a single method call.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
static NameValuePair create(java.lang.String pName, java.lang.Object pValue)
          Factory method for instantiating a NameValuePair object
static NameValuePair create(java.lang.String pName, java.lang.Object pValue, java.lang.Object pContainer)
          Factory method for instantiating a NameValuePair object which also takes an optional container object
 java.lang.Object getContainer()
           
 java.lang.String getName()
           
 java.lang.Object getValue()
           
 java.lang.String getValueAsString()
           
 java.lang.String toString()
          Returns a string representation of this NameValuePair object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Method Detail

getName

public java.lang.String getName()
Returns:
the name

getValue

public java.lang.Object getValue()
Returns:
the value

getValueAsString

public java.lang.String getValueAsString()
Returns:
the value's string representation

getContainer

public java.lang.Object getContainer()
Returns:
the container

create

public static NameValuePair create(java.lang.String pName,
                                   java.lang.Object pValue)
Factory method for instantiating a NameValuePair object

Parameters:
pName - the name
pValue - the value

create

public static NameValuePair create(java.lang.String pName,
                                   java.lang.Object pValue,
                                   java.lang.Object pContainer)
Factory method for instantiating a NameValuePair object which also takes an optional container object

Parameters:
pName - the name
pValue - the value
pContainer - an optional container

toString

public java.lang.String toString()
Returns a string representation of this NameValuePair object

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