org.assertj.core.data
Class Offset<T extends Number>

java.lang.Object
  extended by org.assertj.core.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
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
static Offset<BigDecimal> offset(BigDecimal value)
          Creates a new Offset.
static Offset<Double> offset(Double value)
          Creates a new Offset.
static Offset<Float> offset(Float value)
          Creates a new Offset.
static Offset<Integer> offset(Integer value)
          Creates a new 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
Method Detail

offset

public static Offset<Double> offset(Double value)
Creates a new 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 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 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<BigDecimal> offset(BigDecimal value)
Creates a new 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 © 2013–2015 AssertJ. All rights reserved.