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
016/**
017 * If you want to actually use one of these units, then you'll
018 * have to figure out how to implement them
019 * 
020 * @author Grahame Grieve
021 *
022 */
023public class HoldingHandler extends SpecialUnitHandler {
024
025        private String code;
026        private String units;
027        private Decimal value = Decimal.one();
028        
029        
030        /**
031         * @param code
032         * @param units
033         */
034        public HoldingHandler(String code, String units) {
035                super();
036                this.code = code;
037                this.units = units;
038        }
039
040        public HoldingHandler(String code, String units, Decimal value) {
041                super();
042                this.code = code;
043                this.units = units;
044                this.value = value;
045        }
046
047        @Override
048        public String getCode() {
049                return code;
050        }
051
052        @Override
053        public String getUnits() {
054                return units;
055        }
056
057        /* (non-Javadoc)
058         * @see org.eclipse.ohf.ucum.special.SpecialUnitHandler#getValue()
059         */
060        @Override
061        public Decimal getValue() {             
062                return value;
063        }
064
065}