Class MinMax<T>

java.lang.Object
org.n52.shetland.util.MinMax<T>
Type Parameters:
T - the type

public class MinMax<T> extends Object
Since:
1.0.0
  • Constructor Details

    • MinMax

      public MinMax(T minimum, T maximum)
    • MinMax

      public MinMax()
  • Method Details

    • getMinimum

      public T getMinimum()
      Get the value of minimum
      Returns:
      the value of minimum
    • setMinimum

      public MinMax<T> setMinimum(T minimum)
      Set the value of minimum
      Parameters:
      minimum - new value of minimum
      Returns:
      this
    • getMaximum

      public T getMaximum()
      Get the value of maximum
      Returns:
      the value of maximum
    • setMaximum

      public MinMax<T> setMaximum(T maximum)
      Set the value of maximum
      Parameters:
      maximum - new value of maximum
      Returns:
      this
    • extend

      public MinMax<T> extend(T t, Comparator<? super T> c)
      Extend this MinMax to include t.
      Parameters:
      t - the object to include
      c - the comparator used to compare the values
      Returns:
      this
    • extend

      public MinMax<T> extend(MinMax<T> minmax, Comparator<? super T> c)
      * Extend this MinMax to include minmax.
      Parameters:
      minmax - the MinMax to include
      c - the comparator
      Returns:
      this
    • isEmpty

      public boolean isEmpty()
      Checks if this MinMax is empty
      Returns:
      if it is empty
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object