01: /*
02: * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
03: * Copyright (C) 2006 - JScience (http://jscience.org/)
04: * All rights reserved.
05: *
06: * Permission to use, copy, modify, and distribute this software is
07: * freely granted, provided that this notice is preserved.
08: */
09: package org.jscience.physics.model;
10:
11: import javax.measure.converter.UnitConverter;
12: import javax.measure.unit.BaseUnit;
13: import javax.measure.unit.Dimension;
14:
15: /**
16: * This class represents the standard model.
17: *
18: * @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
19: * @version 3.1, April 22, 2006
20: */
21: public class StandardModel extends PhysicalModel {
22:
23: /**
24: * Holds the single instance of this class.
25: */
26: final static StandardModel INSTANCE = new StandardModel();
27:
28: /**
29: * Default constructor (allows for derivation).
30: */
31: protected StandardModel() {
32: }
33:
34: /**
35: * Selects the standard model as the current model.
36: */
37: public static void select() {
38: PhysicalModel.setCurrent(INSTANCE);
39: }
40:
41: // Implements Dimension.Model
42: public Dimension getDimension(BaseUnit<?> unit) {
43: return Dimension.Model.STANDARD.getDimension(unit);
44: }
45:
46: // Implements Dimension.Model
47: public UnitConverter getTransform(BaseUnit<?> unit) {
48: return Dimension.Model.STANDARD.getTransform(unit);
49: }
50:
51: }
|