Java Reference
In-Depth Information
Before we create any more examples, examine the following tables, which
show the methods of the Query class. Each table breaks out a few methods of the
Query class into a category. Table 8.6 shows the methods that make new expres-
sions out of QueryExp objects that were created by other Query methods.
Table 8.6 Methods of the Query class that relate QueryExp objects. The objects are returned by
other Query methods.
Method
Return type
Description
and( QueryExp, QueryExp )
QueryExp
Returns a new expression that is an AND of the
two input expressions
or( QueryExp, QueryExp )
QueryExp
Returns a new expression that is an OR of the
two input expressions
not( QueryExp, QueryExp )
QueryExp
Returns a new expression that is a NOT of the
input expression
Table 8.7 shows the Query class methods that operate over String values and
indicate attributes or classnames of an MBean. These methods are used in con-
junction with ValueExp objects to create QueryExp objects.
Table 8.7
Methods of the Query class that identify labels in an expression (attributes, classnames).
Method
Return type
Description
Returns a value that identifies an
attribute name
attr( String name )
AttributeValueExp
Returns a value that identifies an
attribute name for the given class
attr( String classname,
String name )
AttributeValueExp
Returns a value that identifies the
classname of an MBean
classattr( String name )
AttributeValueExp
Table 8.8 shows the methods that return a ValueExp object. ValueExp objects indi-
cate the value for an MBean attribute that can be used in a QueryExp object.
Table 8.8 Methods of the Query class that return a ValueExp object indicating an attribute value
to be used in a query expression.
Method
Return type
Description
value( boolean )
ValueExp
Returns a ValueExp indicating a boolean value
value( double )
ValueExp
Returns a ValueExp indicating a double value
Search WWH ::




Custom Search