1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-26 16:45:21 +00:00

Add a lot of comments. More to come.

This commit is contained in:
2017-07-25 22:47:48 -07:00
parent ade4eb1035
commit c19ae3b071
13 changed files with 343 additions and 0 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