com.sun.wbem.cim
Class CIMElement

java.lang.Object
  |
  +--com.sun.wbem.cim.CIMElement
Direct Known Subclasses:
CIMClass, CIMInstance, CIMMethod, CIMParameter, CIMProperty, CIMQualifier, CIMQualifierType

public class CIMElement
extends java.lang.Object
implements java.io.Serializable

Base class for managed system elements. Creates and instantiates a CIM element.

Since:
WBEM 1.0
See Also:
Serialized Form

Constructor Summary
CIMElement()
          Instantiates a new CIM element instance and initializes its properties (identifier, name, and null status).
CIMElement(CIMElement element)
          Takes an existing CIM element and uses its name and identifier to instantiate a new CIM element instance.
CIMElement(java.lang.String elementName)
          Takes a string representing the name of an existing CIM element and uses its name and identifier to create this CIM element.
 
Method Summary
 CIMElement assign(CIMElement rhs)
          Takes a CIM element and returns a CIM element instance with the name, identifier, and status assigned.
 boolean equals(java.lang.Object rhs)
          Takes a CIM element and returns true if it is equal to this CIM element.
 java.lang.String getName()
          Returns a string representing the name of a CIM element instance.
 boolean lessThan(CIMElement rhs)
          Compares the element identifier of this CIM element with the element of the input identifier.
 void setName(java.lang.String name)
          Sets the name of a CIM element instance and uses it to set the name and identifier of a CIM element instance.
 java.lang.String toString()
          Returns a String representation of the CIMElement 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 java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMElement

public CIMElement()
Instantiates a new CIM element instance and initializes its properties (identifier, name, and null status).

CIMElement

public CIMElement(CIMElement element)
Takes an existing CIM element and uses its name and identifier to instantiate a new CIM element instance.
Parameters:
element - Existing CIM element.

CIMElement

public CIMElement(java.lang.String elementName)
Takes a string representing the name of an existing CIM element and uses its name and identifier to create this CIM element. The name string is case-insensitive. The name is converted to lowercase to create the identifier.
Parameters:
elementName - The string for the name of an existing CIM element.
Method Detail

getName

public java.lang.String getName()
Returns a string representing the name of a CIM element instance.
Returns:
string Name of this CIM element.

setName

public void setName(java.lang.String name)
Sets the name of a CIM element instance and uses it to set the name and identifier of a CIM element instance.
Parameters:
name - The string name of a CIM element is also used to create the CIM element identifier.

toString

public java.lang.String toString()
Returns a String representation of the CIMElement 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 java.lang.Object
Returns:
string representation of this element

equals

public boolean equals(java.lang.Object rhs)
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 java.lang.Object
Parameters:
rhs - The object to be determined a CIM element.
Returns:
boolean True indicates the CIM element equals this CIM element. False indicates the CIM element does not equal this CIM element.

assign

public CIMElement assign(CIMElement rhs)
Takes a CIM element and returns a CIM element instance with the name, identifier, and status assigned. Use this method to to overwrite the existing object without creating a new one.
Parameters:
rhs - The CIM element used to assign properties (name and identifier) this CIM element.
Returns:
CIMElement New instantiated CIM element.

lessThan

public boolean lessThan(CIMElement rhs)
Compares the element identifier of this CIM element with the element of the input identifier. Useful for sorting CIM elements by identifier. Returns true if this CIM element identifier is less than the input element identifier. Otherwise, returns false.
Parameters:
rhs - The CIM element whose identifier is to be checked.
Returns:
boolean True if this CIM element identifier is less than zero. Otherwise, returns false.