org.fest.assertions.data
Class Offset<T extends Number>

java.lang.Object
  extended by org.fest.assertions.data.Offset<T>
Type Parameters:
T - the type of the offset value.

public class Offset<T extends Number>
extends Object

A positive offset.

Author:
Alex Ruiz, Yvonne Wang

Field Summary
 T value
          The value of this offset.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
static Offset<Double> offset(Double value)
          Creates a new double Offset.
static Offset<Float> offset(Float value)
          Creates a new float Offset.
static Offset<Integer> offset(Integer value)
          Creates a new integer Offset.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public final T extends Number value
The value of this offset.

Method Detail

offset

public static Offset<Double> offset(Double value)
Creates a new double Offset.

Parameters:
value - the value of the offset.
Returns:
the created Offset.
Throws:
NullPointerException - if the given value is null.
IllegalArgumentException - if the given value is negative.

offset

public static Offset<Float> offset(Float value)
Creates a new float Offset.

Parameters:
value - the value of the offset.
Returns:
the created Offset.
Throws:
NullPointerException - if the given value is null.
IllegalArgumentException - if the given value is negative.

offset

public static Offset<Integer> offset(Integer value)
Creates a new integer Offset.

Parameters:
value - the value of the offset.
Returns:
the created Offset.
Throws:
NullPointerException - if the given value is null.
IllegalArgumentException - if the given value is negative.

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


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.