Class Range


  • public class Range
    extends java.lang.Object
    Represents a range of attribute values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Range​(int min, int max)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getMax()
      Returns the maximum allowed value.
      int getMin()
      Returns the minimum allowed value.
      boolean isWithinRange​(int value)
      Returns whether a given attribute value is within the valid attribute values range.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Range

        public Range​(int min,
                     int max)
        Creates a new instance.
        Parameters:
        min - the minimum allowed value
        max - the maximum allowed value
    • Method Detail

      • isWithinRange

        public boolean isWithinRange​(int value)
        Returns whether a given attribute value is within the valid attribute values range.
        Parameters:
        value - the value to check
        Returns:
        whether the value is valid
      • getMin

        public int getMin()
        Returns the minimum allowed value.
        Returns:
        the minimum allowed value
      • getMax

        public int getMax()
        Returns the maximum allowed value.
        Returns:
        the maximum allowed value