KickJava   Java API By Example, From Geeks To Geeks.

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


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 luminous flux density per solid angle as measured
15  * in a given direction relative to the emitting source. The system unit
16  * for this quantity is "cd" (Système International d'Unités).
17  *
18  * @author <a HREF="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
19  * @version 1.0, October 24, 2004
20  */

21 public class LuminousIntensity extends Quantity {
22
23     /**
24      * Holds the system unit.
25      */

26     private final static Unit SYSTEM_UNIT = SI.CANDELA;
27
28     /**
29      * Holds the associated unit.
30      */

31     private final static Unit<LuminousIntensity> UNIT = SI.CANDELA;
32
33     /**
34      * Holds the factory for this class.
35      */

36     private final static Factory<LuminousIntensity> FACTORY = new Factory<LuminousIntensity>(
37             UNIT) {
38         protected LuminousIntensity create() {
39             return new LuminousIntensity();
40         }
41     };
42
43     /**
44      * Represents a {@link LuminousIntensity} amounting to nothing.
45      */

46     public final static LuminousIntensity ZERO = Quantity.valueOf(0, UNIT);
47
48     /**
49      * Default constructor (allows for derivation).
50      */

51     protected LuminousIntensity() {
52     }
53
54     /**
55      * Shows {@link LuminousIntensity} instances in the specified unit.
56      *
57      * @param unit the display unit for {@link LuminousIntensity} instances.
58      */

59     public static void showAs(Unit unit) {
60         QuantityFormat.show(LuminousIntensity.class, unit);
61     }
62
63     private static final long serialVersionUID = 1L;
64
65 }
66
Popular Tags