001/*
002 * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
003 * Copyright (C) 2006 - JScience (http://jscience.org/)
004 * All rights reserved.
005 * 
006 * Permission to use, copy, modify, and distribute this software is
007 * freely granted, provided that this notice is preserved.
008 */
009package org.jscience.physics.model;
010
011import javax.measure.converter.UnitConverter;
012import javax.measure.unit.BaseUnit;
013import javax.measure.unit.Dimension;
014
015/**
016 * This class represents the standard model. 
017 *
018 * @author  <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
019 * @version 3.1, April 22, 2006
020 */
021public class StandardModel extends PhysicalModel {
022
023    /**
024     * Holds the single instance of this class.
025     */
026    final static StandardModel INSTANCE = new StandardModel();
027
028    /**
029     * Default constructor (allows for derivation).
030     */
031    protected StandardModel() {
032    }
033
034    /**
035     * Selects the standard model as the current model.
036     */
037    public static void select() {        
038        PhysicalModel.setCurrent(INSTANCE);
039    }
040
041    // Implements Dimension.Model
042    public Dimension getDimension(BaseUnit<?> unit) {
043        return Dimension.Model.STANDARD.getDimension(unit);
044    }
045
046    // Implements Dimension.Model
047    public UnitConverter getTransform(BaseUnit<?> unit) {
048        return Dimension.Model.STANDARD.getTransform(unit);
049    }
050
051}