Clean up integer64 type
This commit is contained in:
parent
b7661db83e
commit
6cd0af3b8c
|
@ -31,14 +31,12 @@ package org.hl7.fhir.r5.model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseIntegerDatatype;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primitive type "integer" in FHIR: A signed 32-bit integer
|
* Primitive type "integer64" in FHIR: A signed 64-bit integer
|
||||||
*/
|
*/
|
||||||
@DatatypeDef(name = "integer")
|
@DatatypeDef(name = "integer64")
|
||||||
public class Integer64Type extends PrimitiveType<Long> /* implements IBaseInteger64Datatype */ {
|
public class Integer64Type extends PrimitiveType<Long> /* implements IBaseInteger64Datatype */ {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3L;
|
private static final long serialVersionUID = 3L;
|
||||||
|
@ -76,12 +74,8 @@ public class Integer64Type extends PrimitiveType<Long> /* implements IBaseIntege
|
||||||
* @throws IllegalArgumentException If the value is too large to fit in a signed integer
|
* @throws IllegalArgumentException If the value is too large to fit in a signed integer
|
||||||
*/
|
*/
|
||||||
public Integer64Type(Long theValue) {
|
public Integer64Type(Long theValue) {
|
||||||
if (theValue < java.lang.Long.MIN_VALUE || theValue > java.lang.Long.MAX_VALUE) {
|
|
||||||
throw new IllegalArgumentException
|
|
||||||
(theValue + " cannot be cast to int without changing its value.");
|
|
||||||
}
|
|
||||||
if(theValue!=null) {
|
if(theValue!=null) {
|
||||||
setValue((long)theValue.longValue());
|
setValue(theValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue