This commit is contained in:
2025-06-04 18:27:10 +02:00
parent 701e732eb6
commit 1b07a3b6ab
13 changed files with 277 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package quantities.generic;
public abstract class Unit<T extends Quantity<T>> {
public final String name;
public final double baseFactor;
public Unit(String name, double baseFactor) {
this.name = name;
this.baseFactor = baseFactor;
}
public abstract T quantity(double value);
@Override
public String toString() {
return name;
}
}