Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.wbem.cim
Class CIMValue

    java.lang.Object
      |
      +--com.sun.wbem.cim.CIMValue

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

This class encapsulates any CIM value which can be assigned to properties, references and qualifiers. CIM values have a datatype (CIMDataType) and the actual value(s).

Since:
  wbem 1.0
See Also:
  Serialized Form

Field Summary
`static CIMValue` | `FALSE` Initialize CIMValue false to a CIMValue Boolean object containing false.
`static CIMValue` | `TRUE` Initialize CIMValue true to a CIMValue Boolean object containing true.

Constructor Summary
`CIMValue(java.lang.Object o)` Creates a CIMValue object and initializes it with the value 0 and the CIM data type of the Object o.
`CIMValue(java.lang.Object o, CIMDataType dt)` Creates a CIMValue object and initializes it the value 0 and the CIM data type specified in dt, if Object o is null.
`CIMValue(java.util.Vector v, CIMDataType dt)` Creates a CIMValue object and initializes it the value 0 and the CIM data type specified in dt.

Method Summary
`boolean` | `contains(java.lang.Object obj)` Returns true if the value vector of this CIMValue contains the specified Object.
`boolean` | `equals(java.lang.Object obj)` Returns true if the Object obj equals this CIMValue.
`CIMDataType` | `getType()` Returns the CIM data type of this CIMValue.
`java.lang.Object` | `getValue()` Returns the value of this CIMValue.
`boolean` | `isArrayValue()` Returns true if this CIMValue contains an array value.
`boolean` | `isEmpty()` Returns true if the value and data type of this CIMValue are empty.
`boolean` | `isNullValue()` Returns true if this CIMValue contains a null data type.
`int` | `size()` Returns the size of the data type of this CIMValue.
`java.lang.String` | `toMOF()` Returns a MOF representation of the CIMValue.
`java.lang.String` | `toString()` Returns a String representation of the CIMValue.
`java.lang.String` | `toXml()` Returns an XML representation of this CIM value.

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TRUE

    public static final CIMValue TRUE

  Initialize CIMValue true to a CIMValue Boolean object containing true.

### FALSE

    public static final CIMValue FALSE

  Initialize CIMValue false to a CIMValue Boolean object containing false.

Constructor Detail

### CIMValue

    public CIMValue(java.lang.Object o,
                    CIMDataType dt)

  Creates a CIMValue object and initializes it the value 0 and the CIM data type specified in dt, if Object o is null. If Object o is not null, its data type must be the same as the data type dt.
  Parameters:
    `o` - Object used to initialize this CIMValue.
    `dt` - CIMDataType used to initialize this CIMValue.

### CIMValue

    public CIMValue(java.util.Vector v,
                    CIMDataType dt)

  Creates a CIMValue object and initializes it the value 0 and the CIM data type specified in dt. If Vector v is null, the constructor throws a null pointer exception. If Vector v is not null, the data type of each object in the vector must be the same as the data type specified in dt.
  Parameters:
    `v` - Vector used to initialize this CIMValue.
    `dt` - CIMDataType used to initialize this CIMValue.

### CIMValue

    public CIMValue(java.lang.Object o)

  Creates a CIMValue object and initializes it with the value 0 and the CIM data type of the Object o. If the object is a null vector, the constructor throws a null pointer exception. If the object is a vector that is not null, the constructor throws an exception if the data type of each object in the vector is not the same as the data type of the vector.
  Parameters:
    `o` - Java object used to initialize this CIMValue.

Method Detail

### isArrayValue

    public boolean isArrayValue()

  Returns true if this CIMValue contains an array value.
  Returns:
    True if this CIMValue contains an array value. Otherwise, false.

### isNullValue

    public boolean isNullValue()

  Returns true if this CIMValue contains a null data type.
  Returns:
    True if this CIMValue contains a null data type. Otherwise, returns false.

### toMOF

    public java.lang.String toMOF()

  Returns a MOF representation of the CIMValue.
  Returns:
    A string representation of this value in Managed Object Format (MOF).

### toString

    public java.lang.String toString()

  Returns a String representation of the CIMValue. 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:
    A string representation of this value.

### contains

    public boolean contains(java.lang.Object obj)

  Returns true if the value vector of this CIMValue contains the specified Object.
  Returns:
    True if the value vector contains the the specified object. Otherwise, false.

### isEmpty

    public boolean isEmpty()

  Returns true if the value and data type of this CIMValue are empty. If the data type is null, it has a null value - it is not empty.
  Returns:
    True if the CIMValue is empty. Otherwise, false.

### size

    public int size()

  Returns the size of the data type of this CIMValue.
  Returns:
    The size of the data type of this CIMValue.

### getValue

    public java.lang.Object getValue()

  Returns the value of this CIMValue.
  Returns:
    Object containing the value of this CIMValue.

### getType

    public CIMDataType getType()

  Returns the CIM data type of this CIMValue.
  Returns:
    The CIMDataType of this CIMValue.

### equals

    public boolean equals(java.lang.Object obj)

  Returns true if the Object obj equals this CIMValue.
  Overrides:
    equals in class java.lang.Object
  Parameters:
    `o` - The Object to compare.
  Returns:
    True if the specified object equals this CIMValue. Otherwise, false.

### toXml

    public java.lang.String toXml()

  Returns an XML representation of this CIM value.
  Returns:
    An XML representation of this CIM value, using XML elements from the default XML namespace.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD