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.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 obj)
          Indicates whether some other Object is equal to this one.
 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(byte[] bytes)
            throws java.lang.NullPointerException
Construct a PDAttrValue from a clone of the input byte array
Parameters:
bytes - the input byte array

PDAttrValue

public PDAttrValue(java.lang.String string)
            throws java.lang.NullPointerException
Construct a PDAttrValue from a String
Parameters:
string - the input String
Method Detail

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other Object is equal to this one. In particular, this implementation checks that the types are the same (byte array or String), 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.

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