1 9 package org.jscience.physics.models; 10 11 import javax.measure.converters.RationalConverter; 12 import javax.measure.converters.UnitConverter; 13 import javax.measure.units.BaseUnit; 14 import javax.measure.units.Dimension; 15 import javax.measure.units.SI; 16 17 23 public class HighEnergyModel extends PhysicalModel { 24 25 28 final static HighEnergyModel INSTANCE = new HighEnergyModel(); 29 30 33 private static RationalConverter METER_TO_TIME 34 = new RationalConverter(1, 299792458); 35 36 39 public static void select() { 40 throw new UnsupportedOperationException ("Not implemented"); 41 } 42 43 public Dimension getDimension(BaseUnit unit) { 45 if (unit.equals(SI.METER)) return Dimension.TIME; 46 return Dimension.Model.STANDARD.getDimension(unit); 47 } 48 49 public UnitConverter getTransform(BaseUnit unit) { 51 if (unit.equals(SI.METER)) return METER_TO_TIME; 52 return Dimension.Model.STANDARD.getTransform(unit); 53 } 54 55 } | Popular Tags |