Package gda.util.converters
Interface IConverter<Source,Target>
- Type Parameters:
Source- Can be of any type.Target- Can be of any type.
- All Known Subinterfaces:
IQuantitiesConverter<S,,T> IQuantityConverter<S,,T> IReloadableQuantitiesConverter<S,T>
- All Known Implementing Classes:
AutoRenameableConverter,CoupledConverterHolder,EnergyPositionConverter,JEPConverterHolder,LookupTableConverterHolder,LookupTableQuantityConverter,RenameableConverter,SimpleConverter,SimpleConverterBase,SplitConverterHolder
public interface IConverter<Source,Target>
Converts forward and back between a source and a target
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true is the conversion reverses the sense.Calculates a value for Source given the value of the targetCalculates a value for Target given the value of the source
-
Method Details
-
toSource
Calculates a value for Source given the value of the target- Parameters:
target-- Returns:
- The value calculated from the value of the target *
- Throws:
Exception
-
toTarget
Calculates a value for Target given the value of the source- Parameters:
source-- Returns:
- The value calculated from the value of the source
- Throws:
Exception
-
sourceMinIsTargetMax
boolean sourceMinIsTargetMax()Returns true is the conversion reverses the sense. So that to get the max of the source you convert the min of the target and vice versa- Returns:
- true is the conversion reverses the sense.
-