|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Selector
A Selector is used with a Parameter or Value wherever selective comparison of Parameters and/or Values is needed.
The criteria are specified as the characteristics of the Parameter and/or Value to use in making a selection, and the combinatorial boolean logic to apply to the characteristics when comparing one object against another. The implementation must provide the definition of the criteria and comparison methods declared here. The Selector interface defines the criteria symbols:
Parameter selection characteristics:
NAME
CLASSIFICATION
VALUE
COMMENTS
Value selection characteristics:
DATA
TYPE
BASE
UNITS
Criteria modifiers:
ANY
ANY_PARAMETER
ANY_VALUE
SPECIFIC
PATTERN_MATCH
Logic criteria (as test conditions):
EQUAL
LESS_THAN
GREATER_THAN
AND
How the methods that test for match conditions on pairs of Parameter or Value objects can be controlled by combining the selection criteria. A Selector criteria code is composed of bit flags stored in an int variable.
Selection
,
Parameter
,
Value
Field Summary | |
---|---|
static int |
AND
Criteria to use logical AND when matching with multiple criteria. |
static int |
ANY
Criteria to select any characteristic. |
static int |
ANY_PARAMETER
Criteria to select any Parameter characteristic. |
static int |
ANY_VALUE
Criteria to select any Value characteristic. |
static int |
BASE
Criteria to select a Value's integer number base. |
static int |
CLASSIFICATION
Criteria to select a Parameter's classification. |
static int |
COMMENTS
Criteria to select a Parameter's comments. |
static int |
DATA
Criteria to select the data of a Value. |
static int |
EQUAL
Criteria to use equality logic when comparing values. |
static int |
GREATER_THAN
Criteria to use > logic when comparing values. |
static int |
LESS_THAN
Criteria to use < logic when comparing values. |
static int |
LOGIC
Bit mask for the criteria logic. |
static int |
MODIFIERS
Bit mask for the criteria modifiers. |
static int |
NAME
Criteria to select a Parameter's name. |
static int |
PARAMETER_MATCH
Criteria to select an exact match of all Parameter characteristics. |
static int |
PARAMETER_SELECTION
Bit mask for the Parameter characteristics criteria. |
static int |
PATTERN_MATCH
Criteria to use pattern matching. |
static int |
SPECIFIC
Criteria to use specific criteria matching. |
static int |
TYPE
Criteria to select a Value's type. |
static int |
UNITS
Criteria to select a Value's units description. |
static int |
VALUE
Criteria to select a Parameter's Value. |
static int |
VALUE_MATCH
Criteria to select an exact match of all Value characteristics. |
static int |
VALUE_SELECTION
Bit mask for the Value characteristics criteria. |
Method Summary | |
---|---|
boolean |
And()
Tests if AND logic is to be used when matching with multiple criteria. |
Selector |
And(boolean mode)
Enables or disables using logical AND when matching with multiple criteria. |
boolean |
Any_Parameter()
Tests if any Parameter characteristic will match. |
Selector |
Any_Parameter(boolean mode)
Enables or disables using any Parameter characteristic to match. |
boolean |
Any_Value()
Tests if any Value characteristic will match. |
Selector |
Any_Value(boolean mode)
Enables or disables using any Value characteristic to match. |
boolean |
Base()
Tests if the Value integer base criteria is enabled. |
Selector |
Base(boolean mode)
Enables or disables the Value integer base criteria. |
boolean |
Bases_Match(Value this_value,
Value that_value)
Tests if the integer base numbers of two Values match according to the current selection criteria. |
boolean |
Classification()
Tests if the Parameter classification criteria is enabled. |
Selector |
Classification(boolean mode)
Enables or disables the Parameter classification criteria. |
boolean |
Classifications_Match(Parameter this_parameter,
Parameter that_parameter)
Tests if the classifications of two Parameters match according to the current selection criteria. |
boolean |
Comments_Match(Parameter this_parameter,
Parameter that_parameter)
Tests if the comments of two Parameters match according to the current selection criteria. |
boolean |
Comments()
Tests if the Parameter comments criteria is enabled. |
Selector |
Comments(boolean mode)
Enables or disables the Parameter comments criteria. |
int |
Criteria()
Gets the current selection criteria code. |
Selector |
Criteria(int criteria)
Sets selection criteria to the specified code. |
boolean |
Data_Match(Value this_value,
Value that_value)
Tests if the data of two Values match according to the current selection criteria. |
boolean |
Data()
Tests if the data of a Value is a criteria. |
Selector |
Data(boolean mode)
Enables or disables using the data of a Value as a criteria. |
boolean |
Equal()
Tests if equality logic is to be used for value comparisons. |
Selector |
Equal(boolean mode)
Enables or disables using equality logic for value comparisons. |
boolean |
Greater_Than()
Tests if greater-than logic is to be used for value comparisons. |
Selector |
Greater_Than(boolean mode)
Enables or disables using greater-than logic for value comparisons. |
boolean |
Less_Than()
Tests if less-than logic is to be used for value comparisons. |
Selector |
Less_Than(boolean mode)
Enables or disables using less-than logic for value comparisons. |
int |
Logic()
Gets the current selection logic code. |
int |
Modifiers()
Gets the current selection criteria modifications code. |
boolean |
Name()
Tests if the Parameter name criteria is enabled. |
Selector |
Name(boolean mode)
Enables or disables the Parameter name criteria. |
boolean |
Names_Match(Parameter this_parameter,
Parameter that_parameter)
Tests if the names of two Parameters match according to the current selection criteria. |
int |
Parameter_Criteria()
Gets the current Parameter selection criteria code. |
boolean |
Parameter_Values_Match(Parameter this_parameter,
Parameter that_parameter)
Tests if the Values of two Parameters match according to the current selection criteria. |
int |
Parameters_Criteria_Match(Parameter this_parameter,
Parameter that_parameter)
Gets all the criteria that are met, as a selection code, when comparing two Parameters. |
int |
Parameters_Match()
Gets the criteria that were met, as a selection code, during the last use of the Parameters_Match method. |
boolean |
Parameters_Match(Parameter this_parameter,
Parameter that_parameter)
Tests if two Parameters match according to the current selection criteria. |
boolean |
Pattern_Match()
Tests if pattern matching is to be used for comparisons. |
Selector |
Pattern_Match(boolean mode)
Enables or disables using pattern matching for comparisons. |
boolean |
Specific()
Tests if specific category matching is to be used for comparisons. |
Selector |
Specific(boolean mode)
Enables of disables specific category matching. |
String |
toString()
Gets a description of the Selector. |
boolean |
Type()
Tests if the Value type criteria is enabled. |
Selector |
Type(boolean mode)
Enables or disables the Value type criteria. |
boolean |
Types_Match(Value this_value,
Value that_value)
Tests if the types of two Values match according to the current selection criteria. |
boolean |
Units_Match(Value this_value,
Value that_value)
Tests if the units descriptions of two Values match according to the current selection criteria. |
boolean |
Units()
Tests if the Value units description criteria is enabled. |
Selector |
Units(boolean mode)
Enables or disables the Value units description criteria. |
int |
Value_Criteria()
Gets the current Value selection criteria code. |
boolean |
Value()
Tests if the Parameter Value criteria is enabled. |
Selector |
Value(boolean mode)
Enables or disables the Parameter Value criteria. |
int |
Values_Criteria_Match(Value this_value,
Value that_value)
Gets all the criteria that are met, as a selection code, when comparing two Values. |
int |
Values_Match()
Gets the criteria that were met, as a selection code, during the last use of the Values_Match method. |
boolean |
Values_Match(Value this_value,
Value that_value)
Tests if two Values match according to the current selection criteria. |
Field Detail |
---|
static final int PARAMETER_SELECTION
static final int NAME
static final int CLASSIFICATION
static final int VALUE
static final int COMMENTS
static final int VALUE_SELECTION
static final int DATA
static final int TYPE
static final int BASE
static final int UNITS
static final int MODIFIERS
static final int ANY
static final int ANY_PARAMETER
static final int ANY_VALUE
static final int SPECIFIC
static final int PATTERN_MATCH
static final int LOGIC
static final int EQUAL
LESS_THAN
for <= logic,
or GREATER_THAN
for >= logic.
static final int LESS_THAN
EQUAL
for <= logic.
static final int GREATER_THAN
EQUAL
for >= logic.
static final int AND
static final int VALUE_MATCH
DATA | TYPE | BASE | UNITS | AND | SPECIFIC
"
criteria combination.
static final int PARAMETER_MATCH
NAME | CLASSIFICATION | VALUE | COMMENTS | VALUE_MATCH
"
criteria combination.
Method Detail |
---|
String toString()
toString
in class Object
Selector Criteria(int criteria)
int Criteria()
int Parameter_Criteria()
int Value_Criteria()
int Modifiers()
int Logic()
Selector Name(boolean mode)
boolean Name()
Selector Classification(boolean mode)
boolean Classification()
Selector Value(boolean mode)
boolean Value()
Selector Comments(boolean mode)
boolean Comments()
Selector Any_Parameter(boolean mode)
boolean Any_Parameter()
Selector Data(boolean mode)
boolean Data()
Selector Type(boolean mode)
boolean Type()
Selector Base(boolean mode)
boolean Base()
Selector Units(boolean mode)
boolean Units()
Selector Any_Value(boolean mode)
boolean Any_Value()
Selector Pattern_Match(boolean mode)
boolean Pattern_Match()
Selector Specific(boolean mode)
boolean Specific()
Selector Equal(boolean mode)
boolean Equal()
Selector Less_Than(boolean mode)
boolean Less_Than()
Selector Greater_Than(boolean mode)
boolean Greater_Than()
Selector And(boolean mode)
boolean And()
boolean Parameters_Match(Parameter this_parameter, Parameter that_parameter)
int Parameters_Match()
Parameters_Match
method.
Only those necessary and sufficient criteria that were actually met during the comparisons are set. There may be additional criteria that could have been met but were not needed to satisfy the match.
int Parameters_Criteria_Match(Parameter this_parameter, Parameter that_parameter)
All current selection criteria are tested and those that are met are set in the returned code.
boolean Names_Match(Parameter this_parameter, Parameter that_parameter)
boolean Classifications_Match(Parameter this_parameter, Parameter that_parameter)
boolean Parameter_Values_Match(Parameter this_parameter, Parameter that_parameter)
boolean Comments_Match(Parameter this_parameter, Parameter that_parameter)
boolean Values_Match(Value this_value, Value that_value)
int Values_Match()
Values_Match
method.
Only those necessary and sufficient criteria that were actually met during the comparisons are set. There may be additional criteria that could have been met but were not needed to satisfy the match.
int Values_Criteria_Match(Value this_value, Value that_value)
All current selection criteria are tested and those that are met are set in the returned code.
boolean Data_Match(Value this_value, Value that_value)
boolean Types_Match(Value this_value, Value that_value)
boolean Bases_Match(Value this_value, Value that_value)
boolean Units_Match(Value this_value, Value that_value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |