Package org.hl7.fhir.dstu2.model
Class IntegerType
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.Element
-
- org.hl7.fhir.dstu2.model.Type
-
- org.hl7.fhir.dstu2.model.PrimitiveType<Integer>
-
- org.hl7.fhir.dstu2.model.IntegerType
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseDatatype,org.hl7.fhir.instance.model.api.IBaseElement,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IBaseIntegerDatatype,org.hl7.fhir.instance.model.api.IPrimitiveType<Integer>
- Direct Known Subclasses:
PositiveIntType,UnsignedIntType
public class IntegerType extends PrimitiveType<Integer> implements org.hl7.fhir.instance.model.api.IBaseIntegerDatatype
Primitive type "integer" in FHIR: A signed 32-bit integer- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntegerType()ConstructorIntegerType(int theInteger)ConstructorIntegerType(Long theValue)ConstructorIntegerType(String theIntegerAsString)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerTypecopy()protected Stringencode(Integer theValue)Subclasses must override to convert a "coerced" value into an encoded one.StringfhirType()protected Integerparse(String theValue)Subclasses must override to convert an encoded representation of this datatype into a "coerced" one-
Methods inherited from class org.hl7.fhir.dstu2.model.PrimitiveType
asStringValue, equalsDeep, equalsShallow, fromStringValue, getValue, getValueAsString, hashCode, hasValue, isEmpty, isPrimitive, primitiveValue, setValue, setValueAsString, toString, typedCopy, updateStringValue
-
Methods inherited from class org.hl7.fhir.dstu2.model.Element
addChild, addExtension, addExtension, copyValues, getExtension, getExtensionsByUrl, getExtensionString, getId, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, listChildren, setId, setIdElement, setProperty
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, listChildrenByName, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, isEmpty, setUserData
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserData
-
-
-
-
Constructor Detail
-
IntegerType
public IntegerType()
Constructor
-
IntegerType
public IntegerType(int theInteger)
Constructor
-
IntegerType
public IntegerType(String theIntegerAsString)
Constructor- Parameters:
theIntegerAsString- A string representation of an integer- Throws:
IllegalArgumentException- If the string is not a valid integer representation
-
IntegerType
public IntegerType(Long theValue)
Constructor- Parameters:
theValue- The value- Throws:
IllegalArgumentException- If the value is too large to fit in a signed integer
-
-
Method Detail
-
parse
protected Integer parse(String theValue)
Description copied from class:PrimitiveTypeSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein classPrimitiveType<Integer>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
encode
protected String encode(Integer theValue)
Description copied from class:PrimitiveTypeSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein classPrimitiveType<Integer>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
copy
public IntegerType copy()
- Specified by:
copyin classPrimitiveType<Integer>
-
-