Class ScaleRange

  • Direct Known Subclasses:
    ScaleRange

    public class ScaleRange
    extends Object
    Represents and provides utility methods for a scale range (e.g., "scale: [min, max]") that can be applied to a given Rule.
    • Constructor Detail

      • ScaleRange

        public ScaleRange​(double minDenom,
                          double maxDenom)
        Creates a new instance of ScaleRange.
        Parameters:
        minDenom - the minimum scale denominator
        maxDenom - the maximum scale denominator
    • Method Detail

      • applyTo

        public void applyTo​(Rule r)
        Applies this scale range to the given rule.
        Parameters:
        r -
      • contains

        public boolean contains​(double denom)
        Checks if the given scale denominator is contained in this range.
        Parameters:
        denom - the scale denominator to check
        Returns:
        true if the scale denominator is contained in this range, false otherwise
      • getMinDenom

        public double getMinDenom()
        Returns the minimum scale denominator.
      • getMaxDenom

        public double getMaxDenom()
        Returns the maximum scale denominator.