Package org.apache.commons.numbers.field
Class FractionField
- java.lang.Object
-
- org.apache.commons.numbers.field.AbstractField<Fraction>
-
- org.apache.commons.numbers.field.FractionField
-
public final class FractionField extends AbstractField<Fraction>
Fraction
field.
-
-
Field Summary
Fields Modifier and Type Field Description private static FractionField
INSTANCE
Singleton.
-
Constructor Summary
Constructors Modifier Constructor Description private
FractionField()
Singleton.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FractionField
get()
Get the field instance.Fraction
one()
Return the value of one.Fraction
zero()
Return the value of zero.-
Methods inherited from class org.apache.commons.numbers.field.AbstractField
add, divide, multiply, multiply, negate, reciprocal, subtract
-
-
-
-
Field Detail
-
INSTANCE
private static final FractionField INSTANCE
Singleton.
-
-
Method Detail
-
get
public static FractionField get()
Get the field instance.- Returns:
- the field instance.
-
one
public Fraction one()
Return the value of one.- Returns:
- the field element
1
such that for alla
,1 * a == a
.
-
zero
public Fraction zero()
Return the value of zero.- Returns:
- the field element
0
such that for alla
,0 + a == a
.
-
-