Enum RangeMatchPolicy

  • All Implemented Interfaces:
    Serializable, Comparable<RangeMatchPolicy>

    public enum RangeMatchPolicy
    extends Enum<RangeMatchPolicy>
    Provisional way to specify how to match ranged attributes to a filter interval. In principle, intervals can be matched in many different ways, such as using intersection or containment. And interval ends may be open or closed. But the assumption is that we will only need a few specific combinations of these, and these are enumerated here. Keeping these few will mean less confusion for users.

    We specify intervals using only their limiting points. The lower end is always interpreted as being closed. The upper end may be interpreted as either open or closed according to some general rules and the match policies in here.

    Ranged attributes is a concept, where two attributes are specified to form an interval. One attribute specifies the lower limiting point of the interval, where it is closed. The other attribute specifies the upper limiting point of the interval. If this limit point is exactly the same as the lower limit point, this end is closed too. Otherwise it is normally open, unless the match policy explicitly treats it as being closed.

    • Enum Constant Detail

      • CLOSED_INTERSECTS_WITH_CLOSED

        public static final RangeMatchPolicy CLOSED_INTERSECTS_WITH_CLOSED
        Match if the ranged attributes intersects with the filter interval, when treating both intervals as fully closed. This is intended to match as many items as possible, for visualization purposes. May also be used for alternate drag-to-select mode.
      • CONTAINED_IN_CLOSED

        public static final RangeMatchPolicy CONTAINED_IN_CLOSED
        Match if the ranged attributes are fully contained within the filter interval, when treating the filter interval as fully closed, but the attribute intervals as right open, unless degenerated (single point). This is intended for normal drag-to-select mode.
      • CENTER_CONTAINED_IN_RIGHT_OPEN

        public static final RangeMatchPolicy CENTER_CONTAINED_IN_RIGHT_OPEN
        Match if the center point of the ranged attributes is contained within the filter interval, when treating the filter interval as right open. This is intended to match bucket selection for histograms, and should probably be used as the normal drag-to-select mode for those.
    • Method Detail

      • values

        public static RangeMatchPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RangeMatchPolicy c : RangeMatchPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RangeMatchPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null