cn.chenlichao.wmi4j
类 SWbemQualifierSet

java.lang.Object
  继承者 cn.chenlichao.wmi4j.SWbemQualifierSet

public class SWbemQualifierSet
extends Object

A collection of SWbemQualifier objects. Items are added to the collection using the add() method, retrieved from the collection using the item() method, and removed from the collection using the remove() method.
Created by chenlichao on 14-7-26.


方法摘要
 SWbemQualifier add(String name, WMIVariant value)
          Use default parameters for add(String, WMIVariant, Boolean, Boolean, Boolean, Integer)
 SWbemQualifier add(String name, WMIVariant value, Boolean propagatesToSubclasses, Boolean propagatesToInstances, Boolean overridable, Integer flags)
          Add an SWbemQualifier object to the SWbemQualifierSet collection.
 int getCount()
          Get how many items are in this SWbemObjectSet collection.
 SWbemQualifier item(String name)
          Use default parameters for item(String, Integer)
 SWbemQualifier item(String name, Integer flags)
          Gets a named SWbemQualifier from the collection.
 Iterator<E> iterator()
          Create a iterator of this object set.
 void remove(String name)
          Use default parameters for remove(String, Integer)
 void remove(String name, Integer flags)
          Delete a qualifier from the collection.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

add

public SWbemQualifier add(String name,
                          WMIVariant value,
                          Boolean propagatesToSubclasses,
                          Boolean propagatesToInstances,
                          Boolean overridable,
                          Integer flags)
                   throws WMIException
Add an SWbemQualifier object to the SWbemQualifierSet collection. If a qualifier with the same name already exists in the collection, it is replaced

参数:
name - Name of the new qualifier.
value - Variant value of the new qualifier.
propagatesToSubclasses - [Optional] If this new qualifier is propagated to subclasses. The default value is TRUE.
propagatesToInstances - [Optional] If this new qualifier is propagated to instances. The default value is TRUE.
overridable - [Optional] If this qualifier can be overridden when propagated. The default value is TRUE.
flags - [Optional] Reserved. The default value is 0.
返回:
If successful, this method returns the new qualifier. Otherwise, a null object is returned.
抛出:
WMIException

add

public SWbemQualifier add(String name,
                          WMIVariant value)
                   throws WMIException
Use default parameters for add(String, WMIVariant, Boolean, Boolean, Boolean, Integer)

抛出:
WMIException

item

public SWbemQualifier item(String name,
                           Integer flags)
                    throws WMIException
Gets a named SWbemQualifier from the collection.

参数:
name - Name of the qualifier to retrieve.
flags - [Optional] Reserved and must be zero if specified.
返回:
If successful, the requested SWbemQualifier object is returned.
抛出:
WMIException

item

public SWbemQualifier item(String name)
                    throws WMIException
Use default parameters for item(String, Integer)

抛出:
WMIException

remove

public void remove(String name,
                   Integer flags)
            throws WMIException
Delete a qualifier from the collection.

参数:
name - Name of the qualifier to remove.
flags - [Optional] Reserved and must be zero if specified.
抛出:
WMIException

remove

public void remove(String name)
            throws WMIException
Use default parameters for remove(String, Integer)

抛出:
WMIException

getCount

public int getCount()
             throws WMIException
Get how many items are in this SWbemObjectSet collection. This property is read-only.

One thing to be careful of when using Count is that WMI does not keep a running tally of the number of items in a collection. If you request Count for a collection, WMI cannot instantly respond with a number; instead, it must literally count the items, enumerating the entire collection. For a collection that has relatively few items, such as services, this enumeration likely takes less than a second. Counting the number of events in an event log collection, however, can take considerably longer.

And then suppose you want to display the property values for every event in the collection. If so, WMI will have to enumerate the entire collection a second time.

Note: If you attempt to get this property from an SWbemObjectSet object that is returned from a method where the specified flags are included the wbemFlagForwardOnly flag, you will get an wbemErrFailed error.

返回:
The count of items in this SWbemObjectSet collection.
抛出:
WMIException

iterator

public Iterator<E> iterator()
                                                                         throws WMIException
Create a iterator of this object set.

返回:
Iterator instance.
抛出:
WMIException


Copyright © 2014. All rights reserved.