E
- Type parameter.CIMQualifiedElementInterface
public class CIMParameter<E> extends CIMTypedElement implements CIMQualifiedElementInterface
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
.CIMMethod
,
Serialized FormConstructor | Description |
---|---|
CIMParameter(java.lang.String pName,
CIMDataType pType,
CIMQualifier<?>[] pQualifiers) |
Constructs a
CIMParameter object using the specified name,
data type and qualifiers. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object pObj) |
Compares this object against the specified object.
|
CIMParameter<E> |
filter(boolean pIncludeQualifiers,
boolean pLocalOnly) |
Returns a
CIMParameter filtered as specified. |
CIMQualifier<?> |
getQualifier(int pIndex) |
Get a qualifier by index.
|
CIMQualifier<?> |
getQualifier(java.lang.String pName) |
Gets a qualifier by name.
|
int |
getQualifierCount() |
Get the number of qualifiers defined for this CIM Parameter.
|
CIMQualifier<?>[] |
getQualifiers() |
Returns the list of qualifiers for this class.
|
java.lang.Object |
getQualifierValue(java.lang.String pName) |
Gets a qualifier value by name.
|
boolean |
hasQualifier(java.lang.String pName) |
Checks whether the specified qualifier is one of the qualifiers in this
CIM element.
|
boolean |
hasQualifierValue(java.lang.String pName,
java.lang.Object pValue) |
Checks whether the specified qualifier is one of the qualifiers defined
for this parameter with the specified value.
|
java.lang.String |
toString() |
Returns a
String representation of the
CIMParameter . |
compareTo, getName
getDataType, hashCode
public CIMParameter(java.lang.String pName, CIMDataType pType, CIMQualifier<?>[] pQualifiers)
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.pName
- Name of this parameter.pType
- Data type of this parameter.pQualifiers
- Qualifiers for this parameter.public boolean equals(java.lang.Object pObj)
true
if and only if the argument is not null
and is a CIMParameter
object that represents the same value
as this object.equals
in class CIMTypedElement
pObj
- The object to compare.true
if the objects are the same; false
otherwise.public CIMParameter<E> filter(boolean pIncludeQualifiers, boolean pLocalOnly)
CIMParameter
filtered as specified.pIncludeQualifiers
- If true
all qualifiers are returned; otherwise no
qualifiers.pLocalOnly
- If true
only the qualifiers that were not
propagated will be included.CIMParameter
.public CIMQualifier<?> getQualifier(int pIndex) throws java.lang.ArrayIndexOutOfBoundsException
getQualifier
in interface CIMQualifiedElementInterface
pIndex
- The index of the qualifier.java.lang.ArrayIndexOutOfBoundsException
public CIMQualifier<?> getQualifier(java.lang.String pName)
getQualifier
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier to get.null
if the qualifier does not exist, otherwise
returns the reference to the qualifier.public int getQualifierCount()
getQualifierCount
in interface CIMQualifiedElementInterface
public CIMQualifier<?>[] getQualifiers()
getQualifiers
in interface CIMQualifiedElementInterface
public java.lang.Object getQualifierValue(java.lang.String pName)
getQualifierValue
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier to get.null
if the qualifier does not exist or value is
null
, otherwise returns the reference to the
qualifier.public boolean hasQualifier(java.lang.String pName)
hasQualifier
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier.true
if the qualifier exists in this CIM parameter,
otherwise false
.public boolean hasQualifierValue(java.lang.String pName, java.lang.Object pValue)
false
if the qualifier is not applied or if the value does
not match.hasQualifierValue
in interface CIMQualifiedElementInterface
pName
- The name of the qualifier.pValue
- The value to be tested.true
if the qualifier exists in this property,
otherwise false
.public java.lang.String toString()
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
.toString
in class CIMTypedElement
Copyright © 2005, 2013 IBM Corporation. All Rights Reserved.