com.tivoli.pd.jutil
Class PDAttrValue

java.lang.Object
  extended by com.tivoli.pd.jutil.PDEnvironmentObject
      extended by com.tivoli.pd.jutil.PDAttrValue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PDAttrValue
extends com.tivoli.pd.jutil.PDEnvironmentObject
implements java.lang.Cloneable, java.io.Serializable

This class represents the value of a Security Access Manager attribute. A value may be a String, a byte array, a Long, or a PDAdmSvcPobj.

Modes: Local,Remote

See Also:
Serialized Form

Constructor Summary
PDAttrValue(PDBasicContext context, byte[] bytes)
          Constructs a PDAttrValue from a clone of the input byte array.
PDAttrValue(PDBasicContext context, java.lang.Long ulong)
          Constructs a PDAttrValue from an unsigned long object.
PDAttrValue(PDBasicContext context, PDAdmSvcPobj pobj)
          Constructs a PDAttrValue from a clone of the input PDAdmSvcPobj.
PDAttrValue(PDBasicContext context, java.lang.String string)
          Constructs a PDAttrValue from a String.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object.
 boolean equals(java.lang.Object iobj)
          Indicates whether some other Object is equal to this one.
 int getType()
          Returns the type of the current attribute value.
 java.lang.Object getValue()
          Returns the value of the current attribute, which can then be examined.
 int hashCode()
          Returns a hashcode for the current object.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class com.tivoli.pd.jutil.PDEnvironmentObject
getContext, setContext
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDAttrValue

public PDAttrValue(PDBasicContext context,
                   java.lang.String string)
            throws PDException
Constructs a PDAttrValue from a String.

Parameters:
context - the context that defines values for logging and tracing. Cannot be null.
string - the input String. Cannot be null.
Throws:
PDException - if no String is passed in. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAttrValue

public PDAttrValue(PDBasicContext context,
                   byte[] bytes)
            throws PDException
Constructs a PDAttrValue from a clone of the input byte array.

Parameters:
context - the context that defines values for logging and tracing. Cannot be null.
bytes - the input byte array. Cannot be null.
Throws:
PDException - if no byte array is passed in. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAttrValue

public PDAttrValue(PDBasicContext context,
                   PDAdmSvcPobj pobj)
            throws PDException
Constructs a PDAttrValue from a clone of the input PDAdmSvcPobj.

Parameters:
context - the context that defines values for logging and tracing. Cannot be null.
pobj - the administration service protected object. Cannot be null.
Throws:
PDException - if no PDAdmSvcPobj is passed in. This exception may contain error and message codes defined in the product Error Message Reference document.

PDAttrValue

public PDAttrValue(PDBasicContext context,
                   java.lang.Long ulong)
            throws PDException
Constructs a PDAttrValue from an unsigned long object.

Parameters:
context - the context that defines values for logging and tracing. Cannot be null.
ulong - the input Long.
Throws:
PDException - if no Long is passed in. This exception may contain error and message codes defined in the product Error Message Reference document.
Method Detail

equals

public boolean equals(java.lang.Object iobj)
Indicates whether some other Object is equal to this one. In particular, this implementation checks that the types are and then checks the type appropriately.

Overrides:
equals in class java.lang.Object
Parameters:
iobj - the object to be compared to this one.
Returns:
true if the PDAttrValues are identical, false otherwise.

getValue

public java.lang.Object getValue()
Returns the value of the current attribute, which can then be examined.

Returns:
the value of this PDAttrValue.

getType

public int getType()
Returns the type of the current attribute value.

Returns:
the type of this PDAttrValue.

hashCode

public int hashCode()
Returns a hashcode for the current object.

Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
Returns a clone of the object. This is implemented as a deep copy.

Overrides:
clone in class java.lang.Object

toString

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

Overrides:
toString in class java.lang.Object