Package org.assertj.core.data
Class Percentage
- java.lang.Object
-
- org.assertj.core.data.Percentage
-
public class Percentage extends Object
A positive percentage value.- Author:
- Alexander Bishcof
-
-
Field Summary
Fields Modifier and Type Field Description doublevalue
-
Constructor Summary
Constructors Modifier Constructor Description privatePercentage(double value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()private booleannoFractionalPart()StringtoString()static PercentagewithPercentage(double value)Creates a newPercentage.
-
-
-
Method Detail
-
withPercentage
public static Percentage withPercentage(double value)
Creates a newPercentage.- Parameters:
value- the value of the percentage.- Returns:
- the created
Percentage. - Throws:
NullPointerException- if the given value isnull.IllegalArgumentException- if the given value is negative.
-
noFractionalPart
private boolean noFractionalPart()
-
-