001package org.hl7.fhir.dstu3.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu3 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 054import java.util.List; 055 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.ICompositeType; 058 059import ca.uhn.fhir.model.api.annotation.DatatypeDef; 060/** 061 * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. 062 */ 063@DatatypeDef(name="Count") 064public class Count extends Quantity implements ICompositeType { 065 066 private static final long serialVersionUID = 0L; 067 068 /** 069 * Constructor 070 */ 071 public Count() { 072 super(); 073 } 074 075 protected void listChildren(List<Property> children) { 076 super.listChildren(children); 077 } 078 079 @Override 080 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 081 switch (_hash) { 082 default: return super.getNamedProperty(_hash, _name, _checkValid); 083 } 084 085 } 086 087 @Override 088 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 089 switch (hash) { 090 default: return super.getProperty(hash, name, checkValid); 091 } 092 093 } 094 095 @Override 096 public Base setProperty(int hash, String name, Base value) throws FHIRException { 097 switch (hash) { 098 default: return super.setProperty(hash, name, value); 099 } 100 101 } 102 103 @Override 104 public Base setProperty(String name, Base value) throws FHIRException { 105 return super.setProperty(name, value); 106 } 107 108 @Override 109 public Base makeProperty(int hash, String name) throws FHIRException { 110 switch (hash) { 111 default: return super.makeProperty(hash, name); 112 } 113 114 } 115 116 @Override 117 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 118 switch (hash) { 119 default: return super.getTypesForProperty(hash, name); 120 } 121 122 } 123 124 @Override 125 public Base addChild(String name) throws FHIRException { 126 return super.addChild(name); 127 } 128 129 public String fhirType() { 130 return "Count"; 131 132 } 133 134 public Count copy() { 135 Count dst = new Count(); 136 copyValues(dst); 137 return dst; 138 } 139 140 protected Count typedCopy() { 141 return copy(); 142 } 143 144 @Override 145 public boolean equalsDeep(Base other_) { 146 if (!super.equalsDeep(other_)) 147 return false; 148 if (!(other_ instanceof Count)) 149 return false; 150 Count o = (Count) other_; 151 return true; 152 } 153 154 @Override 155 public boolean equalsShallow(Base other_) { 156 if (!super.equalsShallow(other_)) 157 return false; 158 if (!(other_ instanceof Count)) 159 return false; 160 Count o = (Count) other_; 161 return true; 162 } 163 164 public boolean isEmpty() { 165 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(); 166 } 167 168 169} 170