|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectikayaki.MeasurementValue<Double>
ikayaki.NormalizedValue
abstract class NormalizedValue
Specializes the MeasurementValue class with automatic value normalization.
Field Summary |
---|
Constructor Summary | |
---|---|
NormalizedValue(String caption,
String description)
|
Method Summary | |
---|---|
String |
getUnit(Project project)
Returns mA/m or Am^2/kg depending on the normalization that the project uses. |
Double |
getValue(MeasurementStep step)
Calculates a specific normalized value from a measurement step. |
protected abstract Double |
getValue0(MeasurementStep step)
Calculates a specific NOT NORMALIZED value from a measurement step. |
private static Double |
normalize(MeasurementStep step,
Double value)
Normalizes a value by mass or volume, as specified in the project or step. |
Methods inherited from class ikayaki.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(String caption, String description)
Method Detail |
---|
public final Double getValue(MeasurementStep step)
getValue
in class MeasurementValue<Double>
step
- the step from which the value will be calculated.
NullPointerException
- if step is null.protected abstract Double getValue0(MeasurementStep step)
step
- the step from which the value will be calculated.
NullPointerException
- if step is null.public String getUnit(Project project)
getUnit
in class MeasurementValue<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 Double normalize(MeasurementStep step, 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 |