Class Range<T extends java.lang.Number & java.lang.Comparable<T>>

  • java.lang.Object
    • uk.ac.qmul.eecs.depic.patterns.Range<T>
  • Type Parameters:
    T -
    Direct Known Subclasses:
    Chunk, Clip, Selection


    public class Range<T extends java.lang.Number & java.lang.Comparable<T>>
    extends java.lang.Object
    Immutable class containing two comparable number which represent the start and the end of a range.
    • Field Detail

      • end

        protected T extends java.lang.Number & java.lang.Comparable<T> end
      • NORMALIZED_RANGE_D

        public static final Range<java.lang.Double> NORMALIZED_RANGE_D
      • NORMALIZED_RANGE_F

        public static final Range<java.lang.Float> NORMALIZED_RANGE_F
      • start

        protected T extends java.lang.Number & java.lang.Comparable<T> start
    • Constructor Detail

      • Range

        protected Range()
      • Range

        public Range(T t1,
                     T t2)
      • Range

        public Range(Range<T> r1,
                     Range<T> r2)
        Creates a new instance by comparing mm1 and mm2. The minimum of this object will be the minimum value between mm1.getMin() and mm2.getMin(). The maximum of this object will be the maximum value between mm1.getMax() and mm2.getMax().
        Parameters:
        r1 - the former Range whose min and max are to be compared
        r2 - the latter Range whose min and max are to be compared
    • Method Detail

      • getStart

        public T getStart()
      • getEnd

        public T getEnd()
      • lenght

        public float lenght()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object