Package javax.cim
Class CIMParameter<E>
- java.lang.Object
-
- javax.cim.CIMElement
-
- javax.cim.CIMTypedElement
-
- javax.cim.CIMParameter<E>
-
- Type Parameters:
E
- Type parameter.
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CIMElement>
,CIMQualifiedElementInterface
public class CIMParameter<E> extends CIMTypedElement implements CIMQualifiedElementInterface
This class represents a CIM Parameter. A CIM Parameter is a schema item, thus it can only be part of aCIMMethod
definition for aCIMClass
. A parameter can be used to define an input, output or input/output parameter. ACIMParameter
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 useCIMArgument
.- See Also:
CIMMethod
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CIMParameter(java.lang.String pName, CIMDataType pType, CIMQualifier<?>[] pQualifiers)
Constructs aCIMParameter
object using the specified name, data type and qualifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods 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 aCIMParameter
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 aString
representation of theCIMParameter
.-
Methods inherited from class javax.cim.CIMTypedElement
getDataType, hashCode
-
Methods inherited from class javax.cim.CIMElement
compareTo, getName
-
-
-
-
Constructor Detail
-
CIMParameter
public CIMParameter(java.lang.String pName, CIMDataType pType, CIMQualifier<?>[] pQualifiers)
Constructs aCIMParameter
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:
pName
- Name of this parameter.pType
- Data type of this parameter.pQualifiers
- Qualifiers for this parameter.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object pObj)
Compares this object against the specified object. The result istrue
if and only if the argument is notnull
and is aCIMParameter
object that represents the same value as this object.- Overrides:
equals
in classCIMTypedElement
- Parameters:
pObj
- The object to compare.- Returns:
true
if the objects are the same;false
otherwise.
-
filter
public CIMParameter<E> filter(boolean pIncludeQualifiers, boolean pLocalOnly)
Returns aCIMParameter
filtered as specified.- Parameters:
pIncludeQualifiers
- Iftrue
all qualifiers are returned; otherwise no qualifiers.pLocalOnly
- Iftrue
only the qualifiers that were not propagated will be included.- Returns:
- A filtered
CIMParameter
.
-
getQualifier
public CIMQualifier<?> getQualifier(int pIndex) throws java.lang.ArrayIndexOutOfBoundsException
Get a qualifier by index.- Specified by:
getQualifier
in interfaceCIMQualifiedElementInterface
- Parameters:
pIndex
- The index of the qualifier.- Returns:
- The Qualifier at index pIndex.
- Throws:
java.lang.ArrayIndexOutOfBoundsException
-
getQualifier
public CIMQualifier<?> getQualifier(java.lang.String pName)
Gets a qualifier by name.- Specified by:
getQualifier
in interfaceCIMQualifiedElementInterface
- 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 Parameter.- Specified by:
getQualifierCount
in interfaceCIMQualifiedElementInterface
- Returns:
- The number of qualifiers.
-
getQualifiers
public CIMQualifier<?>[] getQualifiers()
Returns the list of qualifiers for this class.- Specified by:
getQualifiers
in interfaceCIMQualifiedElementInterface
- Returns:
- Qualifiers for this class.
-
getQualifierValue
public java.lang.Object getQualifierValue(java.lang.String pName)
Gets a qualifier value by name.- Specified by:
getQualifierValue
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier to get.- Returns:
null
if the qualifier does not exist or value isnull
, otherwise returns the reference to the qualifier.
-
hasQualifier
public boolean hasQualifier(java.lang.String pName)
Checks whether the specified qualifier is one of the qualifiers in this CIM element.- Specified by:
hasQualifier
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier.- Returns:
true
if the qualifier exists in this CIM parameter, otherwisefalse
.
-
hasQualifierValue
public 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. This method will returnfalse
if the qualifier is not applied or if the value does not match.- Specified by:
hasQualifierValue
in interfaceCIMQualifiedElementInterface
- Parameters:
pName
- The name of the qualifier.pValue
- The value to be tested.- Returns:
true
if the qualifier exists in this property, otherwisefalse
.
-
toString
public java.lang.String toString()
Returns aString
representation of theCIMParameter
. 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 benull
.- Overrides:
toString
in classCIMTypedElement
- Returns:
- String representation of this parameter.
-
-