KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jscience > physics > quantities > AngularVelocity


1 /*
2  * JScience - Java(TM) Tools and Libraries for the Advancement of Sciences.
3  * Copyright (C) 2005 - JScience (http://jscience.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */

9 package org.jscience.physics.quantities;
10 import org.jscience.physics.units.SI;
11 import org.jscience.physics.units.Unit;
12
13 /**
14  * This class represents the rate of change of angular displacement
15  * with respect to time. The system unit for this quantity is "rad/s".
16  *
17  * @author <a HREF="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
18  * @version 1.0, October 24, 2004
19  */

20 public class AngularVelocity extends Quantity {
21
22     /**
23      * Holds the associated unit.
24      */

25     private final static Unit<AngularVelocity> UNIT = SI.RADIAN.divide(SI.SECOND);
26
27     /**
28      * Holds the factory for this class.
29      */

30     private final static Factory<AngularVelocity> FACTORY = new Factory<AngularVelocity>(
31             UNIT) {
32         protected AngularVelocity create() {
33             return new AngularVelocity();
34         }
35     };
36
37     /**
38      * Represents a {@link AngularVelocity} amounting to nothing.
39      */

40     public final static AngularVelocity ZERO = Quantity.valueOf(0, UNIT);
41
42     /**
43      * Default constructor (allows for derivation).
44      */

45     protected AngularVelocity() {
46     }
47
48     /**
49      * Shows {@link AngularVelocity} instances in the specified unit.
50      *
51      * @param unit the display unit for {@link AngularVelocity} instances.
52      */

53     public static void showAs(Unit unit) {
54         QuantityFormat.show(AngularVelocity.class, unit);
55     }
56
57     private static final long serialVersionUID = 1L;
58
59 }
60
Popular Tags