javax.cim
Class CIMValuedElement<E>

java.lang.Object
  extended by javax.cim.CIMElement
      extended by javax.cim.CIMTypedElement
          extended by javax.cim.CIMValuedElement<E>
Type Parameters:
E - Type parameter.
All Implemented Interfaces:
Serializable, Comparable<CIMElement>
Direct Known Subclasses:
CIMArgument, CIMProperty, CIMQualifier, CIMQualifierType

public abstract class CIMValuedElement<E>
extends CIMTypedElement

CIMValuedElement is a base class used by any element that contains a name, type and value.

See Also:
Serialized Form

Constructor Summary
protected CIMValuedElement(String pName, CIMDataType pType, E pValue)
          Creates a new CIM element with the given name, type and value.
 
Method Summary
 boolean equals(Object pObj)
          Compares this object against the specified object.
 E getValue()
          Returns the value for this CIM Element.
 int hashCode()
          Returns a hash code value for the CIM valued element.
 String toString()
          Returns a String representation of the CIM Element.
 
Methods inherited from class javax.cim.CIMTypedElement
getDataType
 
Methods inherited from class javax.cim.CIMElement
compareTo, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMValuedElement

protected CIMValuedElement(String pName,
                           CIMDataType pType,
                           E pValue)
Creates a new CIM element with the given name, type and value.

Parameters:
pName - The string for the name for this element.
pType - The data type for this element.
pValue - The value for this element. null is a valid value.
Method Detail

equals

public boolean equals(Object pObj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a CIMValuedElement that represents the same name, type and value as this object.

Overrides:
equals in class CIMTypedElement
Parameters:
pObj - The object to compare with.
Returns:
true if the objects are the same; false otherwise.

getValue

public E getValue()
Returns the value for this CIM Element.

Returns:
The value of the CIM Element. null is a valid value.

hashCode

public int hashCode()
Returns a hash code value for the CIM valued element. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class CIMTypedElement
Returns:
A hash code value for this CIM valued element.

toString

public String toString()
Returns a String representation of the CIM Element. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
toString in class CIMTypedElement
Returns:
String representation of this element.


Copyright © 2005, 2013 IBM Corporation. All Rights Reserved.