Package org.assertj.core.data
Class Percentage
java.lang.Object
org.assertj.core.data.Percentage
A positive percentage value.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()private booleantoString()static PercentagewithPercentage(double value) Creates a newPercentage.
-
Field Details
-
value
public final double value
-
-
Constructor Details
-
Percentage
private Percentage(double value)
-
-
Method Details
-
withPercentage
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.
-
equals
-
hashCode
public int hashCode() -
toString
-
noFractionalPart
private boolean noFractionalPart()
-