Class Range<T>

    • Constructor Detail

      • Range

        public Range()
    • Method Detail

      • validate

        protected void validate()
      • getType

        protected abstract Range.Type getType()
      • getLeft

        protected abstract T getLeft()
      • getRight

        protected abstract T getRight()
      • compare

        protected abstract int compare​(T left,
                                       T right)
      • contains

        protected boolean contains​(T value)
        WARNING: Due limitation of OpenL which cannot work correctly with class level generics, so it is declared as protected. It needs to define public method in children classes with type of generic parameter. OpenL can correctly select required method or show an error.
        Parameters:
        value - value to check it is in the range (interval)
        Returns:
        true if the value is in the interval
      • contains

        public boolean contains​(Range<T> range)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object