Class ScaleRange

Object
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 Details

    • 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 Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMinDenom

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

      public double getMaxDenom()
      Returns the maximum scale denominator.