Package org.jscience.physics.model
Class PhysicalModel
java.lang.Object
org.jscience.physics.model.PhysicalModel
- All Implemented Interfaces:
Dimension.Model
- Direct Known Subclasses:
HighEnergyModel
,NaturalModel
,QuantumModel
,RelativisticModel
,StandardModel
This abstract class represents a physical model. Instances of this class determinate the current quantities dimensions.
To select a model, one needs only to call the model select
static method. For example:[code]
public static void main(String[] args) {
// Global (LocalContext should be used for thread-local settings).
RelativisticModel.select();
...
[/code]
Selecting a predefined model automatically sets the dimension of
the base units
.
-
Field Summary
Fields inherited from interface javax.measure.unit.Dimension.Model
STANDARD
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor (allows for derivation). -
Method Summary
Modifier and TypeMethodDescriptionstatic final PhysicalModel
current()
Returns the current physical model (default: instance ofStandardModel
).protected static final void
setCurrent
(PhysicalModel model) Sets the current model (this method is called when the a predefined model is selected).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.measure.unit.Dimension.Model
getDimension, getTransform
-
Constructor Details
-
PhysicalModel
protected PhysicalModel()Default constructor (allows for derivation).
-
-
Method Details
-
current
Returns the current physical model (default: instance ofStandardModel
).- Returns:
- the context-local physical model.
-
setCurrent
Sets the current model (this method is called when the a predefined model is selected).- Parameters:
model
- the context-local physical model.- See Also:
-