Package javax.cim
Class CIMElement
- java.lang.Object
-
- javax.cim.CIMElement
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CIMElement>
- Direct Known Subclasses:
CIMClass
,CIMTypedElement
public abstract class CIMElement extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CIMElement>
CIMElement
is an abstract base class that represents a CIM Element as defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CIMElement(java.lang.String pName)
Creates a new CIM element with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CIMElement pObj)
Compares this element name to the CIMElement passed in.boolean
equals(java.lang.Object pObj)
Takes a CIM element and returnstrue
if it is equal to this CIM element.java.lang.String
getName()
Returns a string representing the name of a CIM element instance.int
hashCode()
Returns a hash code value for the CIM element.java.lang.String
toString()
Returns aString
representation of theCIMElement
.
-
-
-
Method Detail
-
compareTo
public int compareTo(CIMElement pObj)
Compares this element name to the CIMElement passed in.- Specified by:
compareTo
in interfacejava.lang.Comparable<CIMElement>
- Parameters:
pObj
- The CIMElement to be compared.- Returns:
- A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
equals
public boolean equals(java.lang.Object pObj)
Takes a CIM element and returnstrue
if it is equal to this CIM element. Otherwise, it returnsfalse
. Useful for comparing two CIM elements, for example, to determine whether a CIM element exists in a Collection.- Overrides:
equals
in classjava.lang.Object
- Parameters:
pObj
- The object to be compared a CIM element.- Returns:
true
indicates the specified CIM element equals this CIM element,false
indicates the CIM element does not equal this CIM element.
-
getName
public java.lang.String getName()
Returns a string representing the name of a CIM element instance.- Returns:
- The name of this CIM element.
-
hashCode
public int hashCode()
Returns a hash code value for the CIM element. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code value for this CIM element.
-
toString
public java.lang.String toString()
Returns aString
representation of theCIMElement
. This method is intended to be used only for debugging purposes. The format of the returned string may vary between implementations. The returned string may be empty but may not benull
- Overrides:
toString
in classjava.lang.Object
- Returns:
String
representation of this CIM element.
-
-