Class NumberRule

java.lang.Object
noaa.coastwatch.render.feature.AttributeRule<Number>
noaa.coastwatch.render.feature.NumberRule
All Implemented Interfaces:
Cloneable, SelectionRule

public class NumberRule extends AttributeRule<Number>
A NumberRule provides a selection mechanism for features based on the numercial value of one of the attributes.
Since:
3.3.2
Author:
Peter Hollemans
  • Constructor Details

    • NumberRule

      public NumberRule(String attName, Map<String,Integer> nameMap, Number numberValue)
      Creates a new number rule.
      Parameters:
      attName - the attribute name to use for matching.
      nameMap - the name to index mapping.
      numberValue - the number value to use for matching.
  • Method Details

    • operators

      public Enum[] operators()
      Description copied from class: AttributeRule
      Gets an array of operators that are valid for this rule.
      Specified by:
      operators in class AttributeRule<Number>
      Returns:
      the array of valid operators.
    • matches

      public boolean matches(Feature feature)
      Description copied from interface: SelectionRule
      Determines if a feature matches the rule.
      Parameters:
      feature - the feature to check.
      Returns:
      true if the feature matches this rule or false if not.
    • main

      public static void main(String[] argv) throws Exception
      Tests this class.
      Parameters:
      argv - the array of command line parameters.
      Throws:
      Exception