|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFRAMES2API.Conversion
public class Conversion
Nested Class Summary | |
---|---|
static class |
Conversion.ByReferenceBoolean
|
static class |
Conversion.ByReferenceDouble
|
static class |
Conversion.ByReferenceInteger
|
static class |
Conversion.ByReferenceLong
|
static class |
Conversion.ByReferenceString
|
Constructor Summary | |
---|---|
Conversion()
|
Method Summary | |
---|---|
int |
AddMeasure(java.lang.String Measure,
java.lang.String BaseUnit,
java.lang.String BaseUnitAbbr)
Documentation for: AddMeasure Add a new measure to the set of measures. |
int |
AddUnit(java.lang.String Measure,
java.lang.String Unit,
java.lang.String UnitAbbr,
double Factor,
double Offset)
Documentation for: AddUnit Add a new Unit within a measure. |
int |
DelMeasure(java.lang.String Measure)
Documentation for: DelMeasure Delete a measure frpm the set of measures. |
int |
DelUnit(java.lang.String Measure,
java.lang.String Unit)
Documentation for: DelUnit Delete a unit from a measure. |
int |
GetBaseUnit(java.lang.String Measure,
Conversion.ByReferenceString Unit)
Documentation for: GetBaseUnit Get the base unit factor for a unit from a measure. |
int |
GetBaseUnitAbbr(java.lang.String Measure,
Conversion.ByReferenceString Abbr)
Documentation for: GetBaseUnitAbbr Get the base unit abbreviation for a unit from a measure. |
double |
GetConversion(int MeasureIdx,
double InitValue,
java.lang.String UnitFrom,
java.lang.String UnitTo)
Documentation for: GetConversion Convert a number from one unit in a measure to another unit. |
void |
GetMeasure(int index,
Conversion.ByReferenceString Measure)
Documentation for: GetMeasure Get the name of a measure from a particular index. |
int |
GetMeasureIdx(java.lang.String Measure)
Documentation for: GetMeasureIdx Get the index of measure given its name. |
int |
GetMeasureList(java.lang.String Separator,
Conversion.ByReferenceString MeasureList)
Documentation for: GetMeasureList Get a single string that contains all the measure names separated by a delimiter. |
void |
GetUnit(int MeasureIdx,
int UnitIdx,
Conversion.ByReferenceString Unit)
Documentation for: GetUnit Get the unit associated with a measure and unit index. |
void |
GetUnitAbbr(int MeasureIdx,
int UnitIdx,
Conversion.ByReferenceString Unit)
Documentation for: GetUnitAbbr Get the base unit abbreviation for a unit from a measure. |
int |
GetUnitAbbrIdx(int MeasureIdx,
java.lang.String Abbr)
Documentation for: GetUnitAbbrIdx Get the unit index associated with a measure index and unit Abbr. |
int |
GetUnitFactor(java.lang.String Measure,
java.lang.String Unit,
Conversion.ByReferenceDouble Factor)
Documentation for: GetUnitFactor Get the unit factor for a unit from a measure. |
int |
GetUnitIdx(int MeasureIdx,
java.lang.String Unit)
Documentation for: GetUnitIdx Get the unit index associated with a measure index and unit name. |
int |
GetUnitList(int MeasureIdx,
java.lang.String Separator,
Conversion.ByReferenceString UnitList)
Documentation for: GetUnitList Get a single string that contains all the units in a measure separated by a delimiter. |
int |
GetUnitOffset(java.lang.String Measure,
java.lang.String Unit,
Conversion.ByReferenceDouble Offset)
Documentation for: GetUnitOffset Get the unit factor for a unit from a measure. |
int |
NewUnit(java.lang.String Measure,
java.lang.String Unit,
java.lang.String UnitAbbr)
Documentation for: NewUnit Create a new Unit within a measure. |
int |
NumMeasures()
Documentation for: NumMeasures Returns the number of measures currently in the system. |
int |
NumUnits(int index)
Documentation for: NumUnits Get the number of units for a given measure index. |
int |
SetUnitFactor(java.lang.String Measure,
java.lang.String Unit,
double Factor)
Documentation for: SetUnitFactor Set the unit factor for a unit from a measure. |
int |
SetUnitOffset(java.lang.String Measure,
java.lang.String Unit,
double Offset)
Documentation for: SetUnitOffset Set the unit factor for a unit from a measure. |
double |
sGetConversion(java.lang.String Measure,
double InitValue,
java.lang.String UnitFrom,
java.lang.String UnitTo)
Documentation for: sGetConversion Convert a number from one unit in a measure to another unit. |
void |
sGetUnit(java.lang.String Measure,
int UnitIdx,
Conversion.ByReferenceString Unit)
Documentation for: sGetUnit Get the unit associated with a measure and unit index. |
void |
sGetUnitAbbr(java.lang.String Measure,
int UnitIdx,
Conversion.ByReferenceString Unit)
Documentation for: sGetUnitAbbr Get the base unit abbreviation for a unit from a measure. |
int |
sGetUnitAbbrIdx(java.lang.String Measure,
java.lang.String Abbr)
Documentation for: sGetUnitAbbrIdx Get the unit index associated with a measure index and unit abbr. |
int |
sGetUnitIdx(java.lang.String Measure,
java.lang.String Unit)
Documentation for: sGetUnitIdx Get the unit index associated with a measure index and unit name. |
int |
sGetUnitList(java.lang.String Measure,
java.lang.String Separator,
Conversion.ByReferenceString UnitList)
Documentation for: sGetUnitList Get a single string that contains all the units in a measure separated by a delimiter. |
int |
sNumUnits(java.lang.String index)
Documentation for: sNumUnits Get the number of units for a given measure name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Conversion()
Method Detail |
---|
public int NumMeasures()
public void GetMeasure(int index, Conversion.ByReferenceString Measure)
index
- Index of the measure to returnMeasure
- The measure name at the given indexpublic int GetMeasureIdx(java.lang.String Measure)
Measure
- The measure name to find the index.public int GetMeasureList(java.lang.String Separator, Conversion.ByReferenceString MeasureList)
Separator
- The delimiter to be used between names of modules. Such as (",",";" etc)MeasureList
- The string to store the measure names in.public int NumUnits(int index)
index
- Index of the measurepublic int sNumUnits(java.lang.String index)
index
- Name of the measurepublic void GetUnit(int MeasureIdx, int UnitIdx, Conversion.ByReferenceString Unit)
MeasureIdx
- Index of the measureUnitIdx
- Index of the unitUnit
- Name of the unitpublic void GetUnitAbbr(int MeasureIdx, int UnitIdx, Conversion.ByReferenceString Unit)
MeasureIdx
- Index of the measureUnitIdx
- Index of the UnitUnit
- Unit abbreviation for the given unit index in the measurepublic void sGetUnit(java.lang.String Measure, int UnitIdx, Conversion.ByReferenceString Unit)
Measure
- Name of the measureUnitIdx
- Index of the unitUnit
- Name of the unitpublic void sGetUnitAbbr(java.lang.String Measure, int UnitIdx, Conversion.ByReferenceString Unit)
Measure
- Name of the measureUnitIdx
- Index of the UnitUnit
- Unit abbreviation for the given unit index in the measurepublic int GetUnitIdx(int MeasureIdx, java.lang.String Unit)
MeasureIdx
- Index of the measureUnit
- Name of the unitpublic int sGetUnitIdx(java.lang.String Measure, java.lang.String Unit)
Measure
- Name of the measureUnit
- Name of the unitpublic int GetUnitAbbrIdx(int MeasureIdx, java.lang.String Abbr)
MeasureIdx
- Index of the measureAbbr
- Abbr of the unitpublic int sGetUnitAbbrIdx(java.lang.String Measure, java.lang.String Abbr)
Measure
- Name of the measureAbbr
- Abbr of the unitpublic int GetUnitList(int MeasureIdx, java.lang.String Separator, Conversion.ByReferenceString UnitList)
MeasureIdx
- Index of the measureSeparator
- The delimiter to be used between names of modules. Such as (",",";" etc)UnitList
- A single string with all the units separated by the delimiterpublic int sGetUnitList(java.lang.String Measure, java.lang.String Separator, Conversion.ByReferenceString UnitList)
Measure
- Name of the measureSeparator
- The delimiter to be used between names of modules. Such as (",",";" etc)UnitList
- A single string with all the units separated by the delimiterpublic double GetConversion(int MeasureIdx, double InitValue, java.lang.String UnitFrom, java.lang.String UnitTo)
MeasureIdx
- Index of the measureInitValue
- Value to be convertedUnitFrom
- Unit to convert fromUnitTo
- Unit to convert topublic double sGetConversion(java.lang.String Measure, double InitValue, java.lang.String UnitFrom, java.lang.String UnitTo)
Measure
- Name of the measureInitValue
- Value to be convertedUnitFrom
- Unit to convert fromUnitTo
- Unit to convert topublic int AddMeasure(java.lang.String Measure, java.lang.String BaseUnit, java.lang.String BaseUnitAbbr)
Measure
- Name of the new measureBaseUnit
- Base unit of the measure (i.e. meters)BaseUnitAbbr
- Base unit abbreviation (i.e. m)public int DelMeasure(java.lang.String Measure)
Measure
- Name of the new measurepublic int NewUnit(java.lang.String Measure, java.lang.String Unit, java.lang.String UnitAbbr)
Measure
- Name of the measureUnit
- Unit of the new unit (i.e. kilometers)UnitAbbr
- Name of the new unit abbreviation (i.e. km)public int AddUnit(java.lang.String Measure, java.lang.String Unit, java.lang.String UnitAbbr, double Factor, double Offset)
Measure
- Name of the measureUnit
- Unit of the new unit (i.e. kilometers)UnitAbbr
- Name of the new unit abbreviation (i.e. km)Factor
- The slope of the line interpolation between the base unit and this new unit. (i.e. 1e-3)Offset
- The offset (intercept) of the interpolation line between the base unit and the new unit (i.e. 0.0)public int DelUnit(java.lang.String Measure, java.lang.String Unit)
Measure
- Name of the measureUnit
- Name of the Unit to deletepublic int GetUnitFactor(java.lang.String Measure, java.lang.String Unit, Conversion.ByReferenceDouble Factor)
Measure
- Name of the measureUnit
- Name of the UnitFactor
- Factor for conversion between this unit and the base unit of the measurepublic int GetUnitOffset(java.lang.String Measure, java.lang.String Unit, Conversion.ByReferenceDouble Offset)
Measure
- Name of the measureUnit
- Name of the UnitOffset
- Offset of conversion between this unit and the base unit of the measurepublic int SetUnitFactor(java.lang.String Measure, java.lang.String Unit, double Factor)
Measure
- Name of the measureUnit
- Name of the UnitFactor
- The new Factor for conversion between this unit and the base unit of the measurepublic int SetUnitOffset(java.lang.String Measure, java.lang.String Unit, double Offset)
Measure
- Name of the measureUnit
- Name of the UnitOffset
- The new Offset of conversion between this unit and the base unit of the measurepublic int GetBaseUnit(java.lang.String Measure, Conversion.ByReferenceString Unit)
Measure
- Name of the measureUnit
- Name of the base Unitpublic int GetBaseUnitAbbr(java.lang.String Measure, Conversion.ByReferenceString Abbr)
Measure
- Name of the measureAbbr
- Abbreviation of the base Unit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |