Package org.fest.assertions.data
Class Offset<T extends java.lang.Number>
- java.lang.Object
-
- org.fest.assertions.data.Offset<T>
-
- 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
static Offset<java.lang.Double>
offset(java.lang.Double value)
Creates a newOffset
.static Offset<java.lang.Float>
offset(java.lang.Float value)
Creates a newOffset
.static Offset<java.lang.Integer>
offset(java.lang.Integer value)
Creates a newOffset
.java.lang.String
toString()
-
-
-
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 newOffset
.- Parameters:
value
- the value of the offset.- Returns:
- the created
Offset
. - Throws:
java.lang.NullPointerException
- if the given value isnull
.java.lang.IllegalArgumentException
- if the given value is negative.
-
offset
public static Offset<java.lang.Float> offset(java.lang.Float value)
Creates a newOffset
.- Parameters:
value
- the value of the offset.- Returns:
- the created
Offset
. - Throws:
java.lang.NullPointerException
- if the given value isnull
.java.lang.IllegalArgumentException
- if the given value is negative.
-
offset
public static Offset<java.lang.Integer> offset(java.lang.Integer value)
Creates a newOffset
.- Parameters:
value
- the value of the offset.- Returns:
- the created
Offset
. - Throws:
java.lang.NullPointerException
- if the given value isnull
.java.lang.IllegalArgumentException
- if the given value is negative.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-