001package org.hl7.fhir.dstu3.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
033
034import java.util.*;
035
036import ca.uhn.fhir.model.api.annotation.Child;
037import ca.uhn.fhir.model.api.annotation.ChildOrder;
038import ca.uhn.fhir.model.api.annotation.Description;
039import ca.uhn.fhir.model.api.annotation.DatatypeDef;
040import ca.uhn.fhir.model.api.annotation.Block;
041import org.hl7.fhir.instance.model.api.*;
042import org.hl7.fhir.exceptions.FHIRException;
043/**
044 * 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.
045 */
046@DatatypeDef(name="Count")
047public class Count extends Quantity implements ICompositeType {
048
049    private static final long serialVersionUID = 0L;
050
051  /**
052   * Constructor
053   */
054    public Count() {
055      super();
056    }
057
058      protected void listChildren(List<Property> childrenList) {
059        super.listChildren(childrenList);
060      }
061
062      @Override
063      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
064        switch (hash) {
065        default: return super.getProperty(hash, name, checkValid);
066        }
067
068      }
069
070      @Override
071      public Base setProperty(int hash, String name, Base value) throws FHIRException {
072        switch (hash) {
073        default: return super.setProperty(hash, name, value);
074        }
075
076      }
077
078      @Override
079      public Base setProperty(String name, Base value) throws FHIRException {
080          return super.setProperty(name, value);
081      }
082
083      @Override
084      public Base makeProperty(int hash, String name) throws FHIRException {
085        switch (hash) {
086        default: return super.makeProperty(hash, name);
087        }
088
089      }
090
091      @Override
092      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
093        switch (hash) {
094        default: return super.getTypesForProperty(hash, name);
095        }
096
097      }
098
099      @Override
100      public Base addChild(String name) throws FHIRException {
101          return super.addChild(name);
102      }
103
104  public String fhirType() {
105    return "Count";
106
107  }
108
109      public Count copy() {
110        Count dst = new Count();
111        copyValues(dst);
112        return dst;
113      }
114
115      protected Count typedCopy() {
116        return copy();
117      }
118
119      @Override
120      public boolean equalsDeep(Base other) {
121        if (!super.equalsDeep(other))
122          return false;
123        if (!(other instanceof Count))
124          return false;
125        Count o = (Count) other;
126        return true;
127      }
128
129      @Override
130      public boolean equalsShallow(Base other) {
131        if (!super.equalsShallow(other))
132          return false;
133        if (!(other instanceof Count))
134          return false;
135        Count o = (Count) other;
136        return true;
137      }
138
139      public boolean isEmpty() {
140        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
141      }
142
143
144}
145