javax.cim
E
- : Type Parameterpublic class CIMClassProperty<E> extends CIMProperty<E> implements CIMQualifiedElementInterface
CIMProperty
class inherits the
property name from its parent class (
CIMProperty extends CIMQualifiedElement
). A CIM Property is
defined by its name, data type and origin class.Constructor and Description |
---|
CIMClassProperty(String pName,
CIMDataType pType,
E pValue,
CIMQualifier<?>[] pQualifiers,
boolean pKey,
boolean propagated,
String originClass)
This method constructs an instance of
CIMClassProperty . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object pObj)
Compares this object against the specified object.
|
CIMClassProperty<E> |
filter(boolean pIncludeQualifiers,
boolean pIncludeClassOrigin)
Returns a
CIMClassProperty filtered as specified. |
CIMClassProperty<E> |
filter(boolean pIncludeQualifiers,
boolean pIncludeClassOrigin,
boolean pLocalOnly)
Returns a CIMClassProperty filtered as specified.
|
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 property.
|
CIMQualifier<?>[] |
getQualifiers()
Returns the list of qualifiers for this property.
|
Object |
getQualifierValue(String pName)
Gets a qualifier value by name.
|
boolean |
hasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers defined
for this property.
|
boolean |
hasQualifierValue(String pName,
Object pValue)
Checks whether the specified qualifier is one of the qualifiers defined
for this property with the specified value.
|
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. |
getOriginClass, isKey, isPropagated
getValue
getDataType
compareTo, getName, hashCode
public CIMClassProperty(String pName, CIMDataType pType, E pValue, CIMQualifier<?>[] pQualifiers, boolean pKey, boolean propagated, String originClass)
CIMClassProperty
.pName
- - The name of the property.pType
- - The data type of the property.pValue
- - The value of the property.pQualifiers
- - The qualifiers for the property.pKey
- - true
if the property is a key, otherwise
false
.propagated
- - true
if the property was inherited, otherwise
false
.originClass
- - The original class in which the property was defined.public boolean equals(Object pObj)
CIMProperty
true
if and only if the argument is not null
and is a CIMValuedObject
that represents the same name, type
and value as this object.equals
in class CIMProperty<E>
pObj
- - the object to compare with.true
if the objects are the same; false
otherwise.CIMProperty.equals(java.lang.Object)
public CIMClassProperty<E> filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
CIMClassProperty
filtered as specified.pIncludeQualifiers
- - If true
all qualifiers are returned; otherwise
no qualifiers.pIncludeClassOrigin
- - If true
the class origin is included; otherwise
no class origin is presentCIMClassProperty
.public CIMClassProperty<E> filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly)
pIncludeQualifiers
- If true all qualifiers are returned; otherwise no qualifiers.pIncludeClassOrigin
- If true the class origin is included; otherwise no class
origin is presentpLocalOnly
- If true only the qualifiers that were not propagated will be
included.public CIMQualifier<?> getQualifier(int pIndex)
getQualifier
in interface CIMQualifiedElementInterface
pIndex
- - The index of the qualifier to retrieve.public CIMQualifier<?> getQualifier(String pName)
getQualifier
in interface CIMQualifiedElementInterface
pName
- - The name of the qualifier to get.null
if the qualifier
does not exist.public Object getQualifierValue(String pName)
CIMQualifiedElementInterface
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.CIMQualifiedElementInterface.getQualifierValue(java.lang.String)
public int getQualifierCount()
getQualifierCount
in interface CIMQualifiedElementInterface
public CIMQualifier<?>[] getQualifiers()
getQualifiers
in interface CIMQualifiedElementInterface
public boolean hasQualifier(String pName)
hasQualifier
in interface CIMQualifiedElementInterface
pName
- - the name of the qualifier.true
if the qualifier exists in this property,
otherwise false
.public boolean hasQualifierValue(String pName, Object pValue)
CIMQualifiedElementInterface
hasQualifierValue
in interface CIMQualifiedElementInterface
pName
- - the name of the qualifierpValue
- - the value to be testedtrue
if the qualifier exists and has the value,
otherwise false
.CIMQualifiedElementInterface.hasQualifierValue(java.lang.String,
java.lang.Object)
public String toString()
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
.toString
in class CIMProperty<E>
CIMTypedElement.toString()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.