X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcom%2Fbillkuker%2Frocketry%2Fmotorsim%2Ffuel%2FSaintRobertFuel.java;h=389d9ce097eea35ada9c907048c1b1935d4bd87e;hb=478c92a7279a82a6dc6b3df249ac446eccc89d85;hp=93c440c178ccd4b64b398f3fec4a831616338460;hpb=a19d7b707c76cba2ec8df48fa314cb3227706caf;p=sw%2Fmotorsim diff --git a/src/com/billkuker/rocketry/motorsim/fuel/SaintRobertFuel.java b/src/com/billkuker/rocketry/motorsim/fuel/SaintRobertFuel.java index 93c440c..389d9ce 100644 --- a/src/com/billkuker/rocketry/motorsim/fuel/SaintRobertFuel.java +++ b/src/com/billkuker/rocketry/motorsim/fuel/SaintRobertFuel.java @@ -1,5 +1,8 @@ package com.billkuker.rocketry.motorsim.fuel; +import java.net.URI; +import java.net.URISyntaxException; + import javax.measure.quantity.Pressure; import javax.measure.quantity.Velocity; import javax.measure.quantity.VolumetricDensity; @@ -13,7 +16,7 @@ import com.billkuker.rocketry.motorsim.RocketScience; public abstract class SaintRobertFuel implements Fuel { - public enum Type{ + public static enum Type{ SI( javax.measure.unit.SI.MILLIMETER.divide(javax.measure.unit.SI.SECOND).asType(Velocity.class), javax.measure.unit.SI.MEGA(javax.measure.unit.SI.PASCAL).asType(Pressure.class)), @@ -67,6 +70,14 @@ public abstract class SaintRobertFuel implements Fuel { public abstract Amount getIdealDensity(); + public URI getURI(){ + try { + return new URI("motorsim:" + this.getClass().getSimpleName()); + } catch (URISyntaxException e) { + throw new Error("Shouldn't happen", e); + } + } + public String getName(){ return this.getClass().getSimpleName(); }