Class CIMElement
java.lang.Object
javax.cim.CIMElement
- All Implemented Interfaces:
Serializable, Comparable<CIMElement>
- Direct Known Subclasses:
CIMClass, CIMTypedElement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(CIMElement pObj) Compares this element name to the CIMElement passed in.boolean
Takes a CIM element and returnstrue
if it is equal to this CIM element.getName()
Returns a string representing the name of a CIM element instance.int
hashCode()
Returns a hash code value for the CIM element.toString()
Returns aString
representation of theCIMElement
.
-
Constructor Details
-
CIMElement
Creates a new CIM element with the given name.- Parameters:
pName
- The string for the name of the element.- Throws:
IllegalArgumentException
- If name isnull
.
-
-
Method Details
-
compareTo
Compares this element name to the CIMElement passed in.- Specified by:
compareTo
in interfaceComparable<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
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. -
getName
Returns a string representing the name of a CIM element instance.- Returns:
- The name of this CIM element.
-
hashCode
-
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
-