001/******************************************************************************* 002 * Crown Copyright (c) 2006 - 2014, Copyright (c) 2006 - 2014 Kestral Computing P/L. 003 * All rights reserved. This program and the accompanying materials 004 * are made available under the terms of the Eclipse Public License v1.0 005 * which accompanies this distribution, and is available at 006 * http://www.eclipse.org/legal/epl-v10.html 007 * 008 * Contributors: 009 * Kestral Computing P/L - initial implementation 010 *******************************************************************************/ 011 012package org.hl7.fhir.utilities.ucum.special; 013 014import org.hl7.fhir.utilities.ucum.Decimal; 015 016public class FahrenheitHandler extends SpecialUnitHandler { 017 018 @Override 019 public String getCode() { 020 return "[degF]"; 021 } 022 023 @Override 024 public String getUnits() { 025 return "K"; 026 } 027 028 /* (non-Javadoc) 029 * @see org.eclipse.ohf.ucum.special.SpecialUnitHandler#getValue() 030 */ 031 @Override 032 public Decimal getValue() { 033 try { 034 return new Decimal(5).divide(new Decimal(9)); 035 } catch (Exception e) { 036 // won't happen 037 return null; 038 } 039 } 040 041}