javax.cim
Class CIMElement

java.lang.Object
  extended by javax.cim.CIMElement
All Implemented Interfaces:
Serializable, Comparable<CIMElement>
Direct Known Subclasses:
CIMClass, CIMTypedElement

public abstract class CIMElement
extends Object
implements Serializable, Comparable<CIMElement>

CIMElement represents the CIM element meta construct as defined in the CIM Infrastructure Specification. It is an abstract base class used for any CIM Element.

See Also:
Serialized Form

Constructor Summary
CIMElement(String pName)
          Creates a new CIM element with the given name.
 
Method Summary
 int compareTo(CIMElement pObj)
          Compares this element name to the CIMElement passed in.
 boolean equals(Object pObj)
          Takes a CIM element and returns true if it is equal to this CIM element.
 String getName()
          Returns a string representing the name of a CIM element instance.
 int hashCode()
          Returns a hashcode value for the CIM element.
 String toString()
          Returns a String representation of the CIMElement.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMElement

public CIMElement(String pName)
Creates a new CIM element with the given name.

Parameters:
pName - - The string for the name of the element.
Method Detail

compareTo

public int compareTo(CIMElement pObj)
Compares this element name to the CIMElement passed in.

Specified by:
compareTo in interface 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.
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(Object pObj)
Takes a CIM element and returns true if it is equal to this CIM element. Otherwise, it returns false. Useful for comparing two CIM elements, for example, to determine whether a CIM element exists in a vector.

Overrides:
equals in class Object
Parameters:
pObj - - The object to be compared a CIM element.
See Also:
Object.equals(java.lang.Object)

getName

public 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 hashcode value for the CIM element. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
A hash code value for this CIM element.
See Also:
Object.hashCode()

toString

public String toString()
Returns a String representation of the CIMElement. 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 be null

Overrides:
toString in class Object
Returns:
String representation of this CIM element.
See Also:
Object.toString()


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