1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-27 09:05:19 +00:00
This commit is contained in:
Arthur Drobot
2017-07-26 09:19:42 -07:00
20 changed files with 579 additions and 68 deletions

View File

@@ -1,14 +1,30 @@
package org.nwapw.abacus.number;
/**
* An implementation of NumberInterface using a double.
*/
public class NaiveNumber implements NumberInterface {
/**
* The value of this number.
*/
private double value;
/**
* Creates a new NaiveNumber with the given value.
* @param value the value to use.
*/
public NaiveNumber(double value) {
this.value = value;
}
/**
* The number zero.
*/
public static final NaiveNumber ZERO = new NaiveNumber(0);
/**
* The number one.
*/
public static final NaiveNumber ONE = new NaiveNumber(1);
@Override