javax.cim
Class CIMProperty<E>

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

public class CIMProperty<E>
extends CIMValuedElement<E>

This class represents a CIM Property as defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). A CIM Property Object consists of a name, data type and value. The CIM Property object also includes a flag to signify whether the property is a key property (used as part of the name of the CIM element), a flag to signify whether it was propagated from a parent class and the class origin information (where the property was originally defined).

See Also:
Serialized Form

Constructor Summary
CIMProperty(java.lang.String pName, CIMDataType pType, E pValue)
          Constructs a CIMProperty to be used in instances.
CIMProperty(java.lang.String pName, CIMDataType pType, E pValue, boolean pKey, boolean pPropagated, java.lang.String pOriginClass)
          Constructs a CIMProperty to be used in instances.
 
Method Summary
 boolean equals(java.lang.Object pObj)
          Compares this object against the specified object.
 java.lang.String getOriginClass()
          Returns the class in which this property was defined or overridden.
 int hashCode()
          Returns a hash code value for the CIM property.
 boolean isKey()
          Convenience method for determining if this property is a Key.
 boolean isPropagated()
          Determines if this property is Propagated.
 java.lang.String toString()
          Returns a String representation of the CIMProperty This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations.
 
Methods inherited from class javax.cim.CIMValuedElement
getValue
 
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

CIMProperty

public CIMProperty(java.lang.String pName,
                   CIMDataType pType,
                   E pValue)
Constructs a CIMProperty to be used in instances. For a CIMClass, CIMClassProperty should be used. This can only be used for non-Key properties, non-propagated properties and when the the origin class is not needed.

Parameters:
pName - The name of the property.
pType - The CIMDataType of the property.
pValue - The value of the property.

CIMProperty

public CIMProperty(java.lang.String pName,
                   CIMDataType pType,
                   E pValue,
                   boolean pKey,
                   boolean pPropagated,
                   java.lang.String pOriginClass)
Constructs a CIMProperty to be used in instances. For a CIMClass, CIMClassProperty should be used.

Parameters:
pName - The name of the property.
pType - The CIMDataType of the property.
pValue - The value of the property.
pKey - true if the property is a key; otherwise false.
pPropagated - true if the value was propagated from the class.
pOriginClass - The class in which this property was defined or overridden.
Method Detail

equals

public boolean equals(java.lang.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 CIMProperty that represents the same name, type and value as this object.

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

getOriginClass

public java.lang.String getOriginClass()
Returns the class in which this property was defined or overridden.

Returns:
Name of class where this property was defined.

hashCode

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

Overrides:
hashCode in class CIMValuedElement<E>
Returns:
A hash code value for this CIM property.

isKey

public boolean isKey()
Convenience method for determining if this property is a Key.

Returns:
true if this property is a key.

isPropagated

public boolean isPropagated()
Determines if this property is Propagated. When this property is part of a class, this value designates that the class origin value is the same as the class name.

Returns:
true if this property is propagated.

toString

public java.lang.String toString()
Returns a String representation of the CIMProperty 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 CIMValuedElement<E>
Returns:
String representation of this property.


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