PIRL.PVL

## Interface Selector

All Known Implementing Classes:
  Selection

    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.

See Also:
  `Selection`, `Parameter`, `Value`

### Field Summary

Fields
`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

Methods
`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

#### PARAMETER_SELECTION

    static final int PARAMETER_SELECTION

Bit mask for the Parameter characteristics criteria.

See Also:
  Constant Field Values

#### NAME

    static final int NAME

Criteria to select a Parameter's name.

See Also:
  Constant Field Values

#### CLASSIFICATION

    static final int CLASSIFICATION

Criteria to select a Parameter's classification.

See Also:
  Constant Field Values

#### VALUE

    static final int VALUE

Criteria to select a Parameter's Value.

See Also:
  Constant Field Values

#### COMMENTS

    static final int COMMENTS

Criteria to select a Parameter's comments.

See Also:
  Constant Field Values

#### VALUE_SELECTION

    static final int VALUE_SELECTION

Bit mask for the Value characteristics criteria.

See Also:
  Constant Field Values

#### DATA

    static final int DATA

Criteria to select the data of a Value.

See Also:
  Constant Field Values

#### TYPE

    static final int TYPE

Criteria to select a Value's type.

See Also:
  Constant Field Values

#### BASE

    static final int BASE

Criteria to select a Value's integer number base.

See Also:
  Constant Field Values

#### UNITS

    static final int UNITS

Criteria to select a Value's units description.

See Also:
  Constant Field Values

#### MODIFIERS

    static final int MODIFIERS

Bit mask for the criteria modifiers.

See Also:
  Constant Field Values

#### ANY

    static final int ANY

Criteria to select any characteristic.

See Also:
  Constant Field Values

#### ANY_PARAMETER

    static final int ANY_PARAMETER

Criteria to select any Parameter characteristic.

See Also:
  Constant Field Values

#### ANY_VALUE

    static final int ANY_VALUE

Criteria to select any Value characteristic.

See Also:
  Constant Field Values

#### SPECIFIC

    static final int SPECIFIC

Criteria to use specific criteria matching.

See Also:
  Constant Field Values

#### PATTERN_MATCH

    static final int PATTERN_MATCH

Criteria to use pattern matching.

See Also:
  Constant Field Values

#### LOGIC

    static final int LOGIC

Bit mask for the criteria logic.

See Also:
  Constant Field Values

#### EQUAL

    static final int EQUAL

Criteria to use equality logic when comparing values. This can be combined with `LESS_THAN` for <= logic, or `GREATER_THAN` for >= logic.

See Also:
  Constant Field Values

#### LESS_THAN

    static final int LESS_THAN

Criteria to use < logic when comparing values. This can be combined with `EQUAL` for <= logic.

See Also:
  Constant Field Values

#### GREATER_THAN

    static final int GREATER_THAN

Criteria to use > logic when comparing values. This can be combined with `EQUAL` for >= logic.

See Also:
  Constant Field Values

#### AND

    static final int AND

Criteria to use logical AND when matching with multiple criteria. Note: When this flag is not set, OR logic is used.

See Also:
  Constant Field Values

#### VALUE_MATCH

    static final int VALUE_MATCH

Criteria to select an exact match of all Value characteristics. This is the same the "`DATA | TYPE | BASE | UNITS | AND | SPECIFIC`" criteria combination.

See Also:
  Constant Field Values

#### PARAMETER_MATCH

    static final int PARAMETER_MATCH

Criteria to select an exact match of all Parameter characteristics. This is the same the "`NAME | CLASSIFICATION | VALUE | COMMENTS | VALUE_MATCH`" criteria combination.

See Also:
  Constant Field Values

### Method Detail

#### toString

    String toString()

Gets a description of the Selector.

Overrides:
  `toString` in class `Object`

#### Criteria

    Selector Criteria(int criteria)

Sets selection criteria to the specified code.

#### Criteria

    int Criteria()

Gets the current selection criteria code.

#### Parameter_Criteria

    int Parameter_Criteria()

Gets the current Parameter selection criteria code.

#### Value_Criteria

    int Value_Criteria()

Gets the current Value selection criteria code.

#### Modifiers

    int Modifiers()

Gets the current selection criteria modifications code.

#### Logic

    int Logic()

Gets the current selection logic code.

#### Name

    Selector Name(boolean mode)

Enables or disables the Parameter name criteria.

#### Name

    boolean Name()

Tests if the Parameter name criteria is enabled.

#### Classification

    Selector Classification(boolean mode)

Enables or disables the Parameter classification criteria.

#### Classification

    boolean Classification()

Tests if the Parameter classification criteria is enabled.

#### Value

    Selector Value(boolean mode)

Enables or disables the Parameter Value criteria.

#### Value

    boolean Value()

Tests if the Parameter Value criteria is enabled.

#### Comments

    Selector Comments(boolean mode)

Enables or disables the Parameter comments criteria.

#### Comments

    boolean Comments()

Tests if the Parameter comments criteria is enabled.

#### Any_Parameter

    Selector Any_Parameter(boolean mode)

Enables or disables using any Parameter characteristic to match.

#### Any_Parameter

    boolean Any_Parameter()

Tests if any Parameter characteristic will match.

#### Data

    Selector Data(boolean mode)

Enables or disables using the data of a Value as a criteria.

#### Data

    boolean Data()

Tests if the data of a Value is a criteria.

#### Type

    Selector Type(boolean mode)

Enables or disables the Value type criteria.

#### Type

    boolean Type()

Tests if the Value type criteria is enabled.

#### Base

    Selector Base(boolean mode)

Enables or disables the Value integer base criteria.

#### Base

    boolean Base()

Tests if the Value integer base criteria is enabled.

#### Units

    Selector Units(boolean mode)

Enables or disables the Value units description criteria.

#### Units

    boolean Units()

Tests if the Value units description criteria is enabled.

#### Any_Value

    Selector Any_Value(boolean mode)

Enables or disables using any Value characteristic to match.

#### Any_Value

    boolean Any_Value()

Tests if any Value characteristic will match.

#### Pattern_Match

    Selector Pattern_Match(boolean mode)

Enables or disables using pattern matching for comparisons.

#### Pattern_Match

    boolean Pattern_Match()

Tests if pattern matching is to be used for comparisons.

#### Specific

    Selector Specific(boolean mode)

Enables of disables specific category matching.

#### Specific

    boolean Specific()

Tests if specific category matching is to be used for comparisons.

#### Equal

    Selector Equal(boolean mode)

Enables or disables using equality logic for value comparisons.

#### Equal

    boolean Equal()

Tests if equality logic is to be used for value comparisons.

#### Less_Than

    Selector Less_Than(boolean mode)

Enables or disables using less-than logic for value comparisons.

#### Less_Than

    boolean Less_Than()

Tests if less-than logic is to be used for value comparisons.

#### Greater_Than

    Selector Greater_Than(boolean mode)

Enables or disables using greater-than logic for value comparisons.

#### Greater_Than

    boolean Greater_Than()

Tests if greater-than logic is to be used for value comparisons.

#### And

    Selector And(boolean mode)

Enables or disables using logical AND when matching with multiple criteria. Disabling AND logic enables OR logic.

#### And

    boolean And()

Tests if AND logic is to be used when matching with multiple criteria.

#### Parameters_Match

    boolean Parameters_Match(Parameter this_parameter,
                           Parameter that_parameter)

Tests if two Parameters match according to the current selection criteria.

#### Parameters_Match

    int Parameters_Match()

Gets the criteria that were met, as a selection code, during the last use of the `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.

#### Parameters_Criteria_Match

    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.

All current selection criteria are tested and those that are met are set in the returned code.

#### Names_Match

    boolean Names_Match(Parameter this_parameter,
                      Parameter that_parameter)

Tests if the names of two Parameters match according to the current selection criteria.

#### Classifications_Match

    boolean Classifications_Match(Parameter this_parameter,
                                Parameter that_parameter)

Tests if the classifications of two Parameters match according to the current selection criteria.

#### Parameter_Values_Match

    boolean Parameter_Values_Match(Parameter this_parameter,
                                 Parameter that_parameter)

Tests if the Values of two Parameters match according to the current selection criteria.

#### Comments_Match

    boolean Comments_Match(Parameter this_parameter,
                         Parameter that_parameter)

Tests if the comments of two Parameters match according to the current selection criteria.

#### Values_Match

    boolean Values_Match(Value this_value,
                       Value that_value)

Tests if two Values match according to the current selection criteria.

#### Values_Match

    int Values_Match()

Gets the criteria that were met, as a selection code, during the last use of the `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.

#### Values_Criteria_Match

    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.

All current selection criteria are tested and those that are met are set in the returned code.

#### Data_Match

    boolean Data_Match(Value this_value,
                     Value that_value)

Tests if the data of two Values match according to the current selection criteria.

#### Types_Match

    boolean Types_Match(Value this_value,
                      Value that_value)

Tests if the types of two Values match according to the current selection criteria.

#### Bases_Match

    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.

#### Units_Match

    boolean Units_Match(Value this_value,
                      Value that_value)

Tests if the units descriptions of two Values match according to the current selection criteria.