public class InstantType extends BaseDateTimeType
TemporalPrecisionEnum.SECOND
TemporalPrecisionEnum.MILLI
| Modifier and Type | Field and Description |
|---|---|
static ca.uhn.fhir.model.api.TemporalPrecisionEnum |
DEFAULT_PRECISION
The default precision for this type
|
| Constructor and Description |
|---|
InstantType()
Constructor which creates an InstantDt with no timne value.
|
InstantType(BaseDateTimeType theDateTime)
Create a new DateTimeDt using an existing value.
|
InstantType(Calendar theCalendar)
Create a new DateTimeDt
|
InstantType(Date theDate)
Create a new DateTimeDt with the given date/time and
TemporalPrecisionEnum.MILLI precision |
InstantType(Date theDate,
ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
Constructor which accepts a date value and a precision value.
|
InstantType(Date theDate,
ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision,
TimeZone theTimezone)
Create a new instance using the given date, precision level, and time zone
|
InstantType(String theString)
Create a new InstantDt from a string value
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
after(Date theDate)
Invokes
Date.after(Date) on the contained Date against the given
date |
boolean |
before(Date theDate)
Invokes
Date.before(Date) on the contained Date against the given
date |
InstantType |
copy() |
String |
fhirType() |
protected ca.uhn.fhir.model.api.TemporalPrecisionEnum |
getDefaultPrecisionForDatatype()
Returns the default precision for this datatype
|
static InstantType |
now()
Returns a new instance of DateTimeType with the current system time and MILLI precision and the system local time
zone
|
static InstantType |
parseV3(String theV3String)
Creates a new instance by parsing an HL7 v3 format date time string
|
void |
setToCurrentTimeInLocalTimeZone()
Sets the value of this instant to the current time (from the system
clock) and the local/default timezone (as retrieved using
TimeZone.getDefault(). |
static InstantType |
withCurrentTime()
Factory method which creates a new InstantDt with millisecond precision and initializes it with the
current time and the system local timezone.
|
add, after, before, dateTimeValue, encode, equalsUsingFhirPathRules, fpValue, getDay, getHour, getMillis, getMinute, getMonth, getNanos, getPrecision, getSecond, getTimeZone, getValueAsCalendar, getYear, hasTime, isDateTime, isTimeZoneZulu, isToday, parse, setDay, setHour, setMillis, setMinute, setMonth, setNanos, setPrecision, setSecond, setTimeZone, setTimeZoneZulu, setValue, setValue, setValueAsString, setValueAsV3String, setYear, toCalendar, toHumanDisplay, toHumanDisplayLocalTimezoneasStringValue, equalsDeep, equalsShallow, forceStringValue, fromStringValue, getProperty, getTypesForProperty, getValue, getValueAsString, hashCode, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, makeProperty, primitiveValue, readExternal, setProperty, setProperty, toString, typedCopy, updateStringValue, writeExternaladdChild, addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElementcastToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setUserData, setUserDataINNclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDatapublic static final ca.uhn.fhir.model.api.TemporalPrecisionEnum DEFAULT_PRECISION
public InstantType()
public InstantType(Calendar theCalendar)
public InstantType(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision, TimeZone theTimezone)
DataFormatException - If the specified precision is not allowed for this typepublic InstantType(BaseDateTimeType theDateTime)
public InstantType(Date theDate)
TemporalPrecisionEnum.MILLI precisionpublic InstantType(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
TemporalPrecisionEnum.SECOND
TemporalPrecisionEnum.MILLI
public InstantType(String theString)
theString - The string representation of the string. Must be in a valid
format according to the FHIR specificationDataFormatExceptionpublic boolean after(Date theDate)
Date.after(Date) on the contained Date against the given
dateNullPointerException - If the contained Date is nullpublic boolean before(Date theDate)
Date.before(Date) on the contained Date against the given
dateNullPointerException - If the contained Date is nullpublic void setToCurrentTimeInLocalTimeZone()
TimeZone.getDefault(). This TimeZone is generally obtained from
the underlying OS.public static InstantType withCurrentTime()
protected ca.uhn.fhir.model.api.TemporalPrecisionEnum getDefaultPrecisionForDatatype()
getDefaultPrecisionForDatatype in class BaseDateTimeTypeDEFAULT_PRECISIONpublic InstantType copy()
copy in class PrimitiveType<Date>public static InstantType now()
public static InstantType parseV3(String theV3String)
Copyright © 2014–2021 Health Level 7. All rights reserved.