|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mavis.MeasurementValue<java.lang.Double> mavis.NormalizedValue
abstract class NormalizedValue
Specializes the MeasurementValue class with automatic value normalization.
Field Summary |
---|
Constructor Summary | |
---|---|
NormalizedValue(java.lang.String caption,
java.lang.String description)
|
Method Summary | |
---|---|
java.lang.String |
getUnit(Project project)
Returns mA/m or Am^2/kg depending on the normalization that the project uses. |
java.lang.Double |
getValue(MeasurementStep step)
Calculates a specific normalized value from a measurement step. |
protected abstract java.lang.Double |
getValue0(MeasurementStep step)
Calculates a specific NOT NORMALIZED value from a measurement step. |
private static java.lang.Double |
normalize(MeasurementStep step,
java.lang.Double value)
Normalizes a value by mass or volume, as specified in the project or step. |
Methods inherited from class mavis.MeasurementValue |
---|
getCaption, getDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NormalizedValue(java.lang.String caption, java.lang.String description)
Method Detail |
---|
public final java.lang.Double getValue(MeasurementStep step)
getValue
in class MeasurementValue<java.lang.Double>
step
- the step from which the value will be calculated.
java.lang.NullPointerException
- if step is null.protected abstract java.lang.Double getValue0(MeasurementStep step)
step
- the step from which the value will be calculated.
java.lang.NullPointerException
- if step is null.public java.lang.String getUnit(Project project)
getUnit
in class MeasurementValue<java.lang.Double>
project
- the currently active project, or null if no project is active. Used for returning a different text
depending on the project.private static java.lang.Double normalize(MeasurementStep step, java.lang.Double value)
step
- the step whose value is being normalized.value
- the value to be normalised. The unit is Am^2.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |