Class Offset<T extends java.lang.Number>

  • Type Parameters:
    T - the type of the offset value.

    public class Offset<T extends java.lang.Number>
    extends java.lang.Object
    A positive offset.
    Author:
    Alex Ruiz, Yvonne Wang
    • Field Summary

      Fields 
      Modifier and Type Field Description
      T value  
    • Field Detail

      • value

        public final T extends java.lang.Number value
    • Method Detail

      • offset

        public static Offset<java.lang.Double> offset​(java.lang.Double value)
        Creates a new Offset.
        Parameters:
        value - the value of the offset.
        Returns:
        the created Offset.
        Throws:
        java.lang.NullPointerException - if the given value is null.
        java.lang.IllegalArgumentException - if the given value is negative.
      • offset

        public static Offset<java.lang.Float> offset​(java.lang.Float value)
        Creates a new Offset.
        Parameters:
        value - the value of the offset.
        Returns:
        the created Offset.
        Throws:
        java.lang.NullPointerException - if the given value is null.
        java.lang.IllegalArgumentException - if the given value is negative.
      • offset

        public static Offset<java.lang.Integer> offset​(java.lang.Integer value)
        Creates a new Offset.
        Parameters:
        value - the value of the offset.
        Returns:
        the created Offset.
        Throws:
        java.lang.NullPointerException - if the given value is null.
        java.lang.IllegalArgumentException - if the given value is negative.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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