public static double convertToKelvin ( TemperatureScale from , double temperature ) { switch ( from ) { case FARENHEIT : return convertFarenheitToKelvin ( temperature ) ; case CELSIUS : return convertCelsiusToKelvin ( temperature ) ; case KELVIN : return temperature ; case RANKINE : return convertRankineToKelvin ( temperature ) ; default : throw ( new RuntimeException ( "Invalid termpature conversion" ) ) ; } }
Convert a temperature value from another temperature scale into the Kelvin temperature scale .