public class Timestamp extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Timestamp.Precision |
Constructor and Description |
---|
Timestamp() |
Timestamp(org.joda.time.DateTime dateTime,
Timestamp.Precision precision)
Initializes a
Timestamp object with the given datetime and precision. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Two HL7 timestamps are equal when they have the same values in the relevant fields
(i.e.
|
static Timestamp |
fromHL7(String s)
Creates a
Timestamp object from the given string. |
org.joda.time.DateTime |
getDateTime()
Timestamp.
|
Timestamp.Precision |
getPrecision() |
int |
hashCode() |
void |
setDateTime(org.joda.time.DateTime dateTime) |
void |
setPrecision(Timestamp.Precision precision)
Precision of the timestamp (smallest present element, e.g.
|
static String |
toHL7(Timestamp timestamp)
Returns a HL7 representation of the given timestamp, considering the precision.
|
String |
toString() |
public Timestamp()
public Timestamp(org.joda.time.DateTime dateTime, Timestamp.Precision precision)
Timestamp
object with the given datetime and precision.public static Timestamp fromHL7(String s)
Timestamp
object from the given string.s
- String of the pattern YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]
.
Milliseconds will be ignored.Timestamp
object, or null
if the parameter is null
or empty.public static String toHL7(Timestamp timestamp)
timestamp
- Timestamp
object, can be null
.null
if the parameter is null
.public void setDateTime(org.joda.time.DateTime dateTime)
public Timestamp.Precision getPrecision()
public boolean equals(Object o)
@Generated(value="lombok") public org.joda.time.DateTime getDateTime()
@Generated(value="lombok") public void setPrecision(Timestamp.Precision precision)
Copyright © 2018 Open eHealth Foundation. All rights reserved.