KickJava   Java API By Example, From Geeks To Geeks.

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


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
11 import org.jscience.physics.units.SI;
12 import org.jscience.physics.units.Unit;
13
14 /**
15  * This class represents a luminous flux. The system unit for this quantity
16  * is "cd·sr". By default, instances of this class are showed in Lumen ("lm").
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 LuminousFlux extends Quantity {
22
23     /**
24      * Holds the associated unit.
25      */

26     private final static Unit<LuminousFlux> UNIT = SI.CANDELA
27             .times(SI.STERADIAN);
28
29     /**
30      * Holds the factory for this class.
31      */

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

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

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

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