com.tivoli.mts
Class PDAttrValue

java.lang.Object
  |
  +--com.tivoli.mts.PDAttrValue
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class PDAttrValue
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Represents the value of a Policy Director attribute. A value may be either a String or a byte array.

Since:
PD 3.8
See Also:
Serialized Form

Constructor Summary
PDAttrValue(byte[] bytes)
          Construct a PDAttrValue from a clone of the input byte array
PDAttrValue(java.lang.Long ulong)
          Construct a PDAttrValue from an unsigned long
PDAttrValue(java.lang.String string)
          Construct a PDAttrValue from a String
 
Method Summary
 java.lang.Object clone()
          Return 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 AZN type of the current object
 java.lang.Object getValue()
          Returns the value of the current object, which can then be examined to see what it is.
 int hashCode()
          Returns a hashcode for the current object.
 java.lang.String toString()
          Return a string version of this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDAttrValue

public PDAttrValue(java.lang.String string)
            throws java.lang.NullPointerException
Construct a PDAttrValue from a String
Parameters:
string - the input String
Throws:
java.lang.NullPointerException - if no String is passed in

PDAttrValue

public PDAttrValue(byte[] bytes)
            throws java.lang.NullPointerException
Construct a PDAttrValue from a clone of the input byte array
Parameters:
bytes - the input byte array
Throws:
java.lang.NullPointerException - if no byte array is passed in

PDAttrValue

public PDAttrValue(java.lang.Long ulong)
            throws java.lang.NullPointerException
Construct a PDAttrValue from an unsigned long
Parameters:
ulong - the input Long
Throws:
java.lang.NullPointerException - if no Long is passed in
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:
obj - the object to be compared to this one
Returns:
true if the PDAttrValue are identical, false otherwise.

getValue

public java.lang.Object getValue()
Returns the value of the current object, which can then be examined to see what it is.
Returns:
the value of this PDAttrValue.

getType

public int getType()
Returns the AZN type of the current object
Returns:
the type of this PDAttrValue.

hashCode

public int hashCode()
Returns a hashcode for the current object.
Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for the current object.

clone

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

toString

public java.lang.String toString()
Return a string version of this object.
Overrides:
toString in class java.lang.Object
Returns:
a String representing this object