javax.cim
Class CIMParameter<E>

java.lang.Object
  extended by javax.cim.CIMElement
      extended by javax.cim.CIMParameter<E>
All Implemented Interfaces:
Serializable, Comparable<CIMElement>, CIMQualifiedElementInterface

public class CIMParameter<E>
extends CIMElement
implements CIMQualifiedElementInterface, Serializable

This class represents a CIM Parameter. A CIM Parameter is a schema item, thus it can only be part of a CIMMethod definition for a CIMClass. A parameter can be used to define an input, output or input/output parameter. A CIMParameter consists of a name, data type and qualifiers. CIMParameters do not have values - so you can not set a default value. CIM Parameters are defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). To invoke a method, you would use CIMArgument.

Since:
JSR48 1.0.0
See Also:
CIMMethod, Serialized Form

Constructor Summary
CIMParameter(String name, CIMDataType type, CIMQualifier<?>[] qualifiers)
          Constructs a CIMParameter object using the specified name, data type and qualifiers.
 
Method Summary
 boolean equals(Object object)
          Compares this object against the specified object.
 CIMParameter<E> filter(boolean pIncludeQualifiers, boolean pLocalOnly)
          Returns a CIMParameter filtered as specified.
 CIMDataType getDataType()
          Returns the CIMDataType for this CIM Element.
 CIMQualifier<?> getQualifier(int pIndex)
          Get a qualifier by index.
 CIMQualifier<?> getQualifier(String pName)
          Gets a qualifier by name.
 int getQualifierCount()
          Get the number of qualifiers defined for this CIM Element.
 CIMQualifier<?>[] getQualifiers()
          Returns the list of qualifiers for this class
 Object getQualifierValue(String name)
          Gets a qualifier value by name.
 boolean hasQualifier(String pName)
          Checks whether the specified qualifier is one of the qualifiers in this CIM element.
 boolean hasQualifierValue(String name, Object value)
          Checks whether the specified qualifier is one of the qualifiers defined for this parameter with the specified value.
 String toString()
          Returns a String representation of the CIMParameter.
 
Methods inherited from class javax.cim.CIMElement
compareTo, getName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CIMParameter

public CIMParameter(String name,
                    CIMDataType type,
                    CIMQualifier<?>[] qualifiers)
Constructs a CIMParameter object using the specified name, data type and qualifiers. Takes a string for the name of an existing CIM parameter and creates a new instance of a CIM parameter, using the name and identifier of the existing CIM parameter.

Parameters:
name - name of this parameter
type - data type of this parameter
qualifiers - qualifiers for this parameter
Method Detail

equals

public boolean equals(Object object)
Compares this object against the specified object. The result is true if and only if the argument is not null and is an UnsignedInteger8 object that represents the same value as this object.

Parameters:
object - the object to compare.
Returns:
true if the objects are the same; false otherwise.

filter

public CIMParameter<E> filter(boolean pIncludeQualifiers,
                              boolean pLocalOnly)
Returns a CIMParameter filtered as specified.

Parameters:
pIncludeQualifiers - If true all qualifiers are returned; otherwise no qualifiers.
pLocalOnly - If true only the qualifiers that were not propagated will be included.
Returns:
CIMClassProperty A filtered CIMClassProperty

getQualifier

public CIMQualifier<?> getQualifier(int pIndex)
Get a qualifier by index.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pIndex - The index of the qualifier
Returns:
CIMQualifier The Qualifier at index pIndex

getQualifier

public CIMQualifier<?> getQualifier(String pName)
Gets a qualifier by name.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - The name of the qualifier to get.
Returns:
Null if the qualifier does not exist, otherwise returns the reference to the qualifier.

getQualifierCount

public int getQualifierCount()
Get the number of qualifiers defined for this CIM Element.

Specified by:
getQualifierCount in interface CIMQualifiedElementInterface
Returns:
int The number of qualifiers.

getQualifiers

public CIMQualifier<?>[] getQualifiers()
Returns the list of qualifiers for this class

Specified by:
getQualifiers in interface CIMQualifiedElementInterface
Returns:
CIMQualifier[] qualifiers for this class

getQualifierValue

public Object getQualifierValue(String name)
Gets a qualifier value by name.

Specified by:
getQualifierValue in interface CIMQualifiedElementInterface
Parameters:
name - The name of the qualifier to get.
Returns:
Null if the qualifier does not exist or value is null, otherwise returns the reference to the qualifier.

hasQualifier

public boolean hasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.

Specified by:
hasQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - the name of the qualifier
Returns:
true if the qualifier exists in this CIM element, otherwise false.

hasQualifierValue

public boolean hasQualifierValue(String name,
                                 Object value)
Checks whether the specified qualifier is one of the qualifiers defined for this parameter with the specified value. This method will return false if the qualifier is not applied or if the value does not match

Specified by:
hasQualifierValue in interface CIMQualifiedElementInterface
Parameters:
name - the name of the qualifier
value - the value to be tested
Returns:
True if the qualifier exists in this property, otherwise false.

toString

public String toString()
Returns a String representation of the CIMParameter. 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 CIMElement
Returns:
string representation of this parameter

getDataType

public CIMDataType getDataType()
Returns the CIMDataType for this CIM Element.

Returns:
CIMDataType of this CIM element.


Copyright © 2002-2008 WBEM Solutions, Inc. All Rights Reserved.