KickJava   Java API By Example, From Geeks To Geeks.

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


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 an electric conductance. The system unit for this
15  * quantity is "A²·s³/(m²·kg)". By default, instances of this class are showed
16  * in Siemens ("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 ElectricConductance extends Quantity {
22
23     /**
24      * Holds the associated unit.
25      */

26     private final static Unit<ElectricConductance> UNIT = SI.SIEMENS;
27
28     /**
29      * Holds the factory for this class.
30      */

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

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

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

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