public class OrdinalCriterionConversion
extends java.lang.Object
FloatField values) for all ordinal values of one ordinal
criterion from memory container. This values may be of type EnumField or StringField.
When an equivalent for such value is stored in this class or get from this class it should be first transformed
to String value.
This can be done by means of EnumField.getName or StringField.get methods.EnumField and StringField) are not used here because
it would be hard to get conversion for such values. Normally, cardinal equivalents are stored in hash table
indexed by String values and String class implements Object.equals method.
If EnumField or StringField values would be used as indexing keys,
only reference equality could be checked when using Hashtable.get method,
since mentioned two types do not implement Object.equals method. This would be not a problem as long as
everything resided in memory but after file write and read all references would be lost.| Constructor | Description |
|---|---|
OrdinalCriterionConversion() |
Sole constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addOrdinalValueEquivalent(java.lang.String ordinalValue,
FloatField cardinalValue) |
Adds equivalent cardinal (
FloatField) value for given ordinal (String) value. |
FloatField |
getOrdinalValueEquivalent(java.lang.String ordinalValue) |
Gets equivalent cardinal (
FloatField) value for given ordinal (String) value. |
public void addOrdinalValueEquivalent(java.lang.String ordinalValue,
FloatField cardinalValue)
FloatField) value for given ordinal (String) value.
Duplicate of given FloatField value is stored in this class.ordinalValue - string with ordinal criterion valuecardinalValue - cardinal value, which will be associated with given ordinal valuepublic FloatField getOrdinalValueEquivalent(java.lang.String ordinalValue)
FloatField) value for given ordinal (String) value.
Duplicate of FloatField value stored in this class is returned.ordinalValue - string with ordinal criterion valueValueNotFoundException - when no conversion information was found for given ordinal value