public final class HistoricalData extends java.lang.Object implements UsesCustomNull
Modifier and Type | Field and Description |
---|---|
static HistoricalData |
NULL
Special value that replaces Java's built-int
null and
is used everywhere Java's would otherwise be used. |
Constructor and Description |
---|
HistoricalData(byte[] blob) |
HistoricalData(byte[] blob,
EpochTime epochTime) |
HistoricalData(byte[] blob,
long millisecondsSince1970) |
HistoricalData(EpochTime epochTime,
byte[] blob) |
HistoricalData(long millisecondsSince1970,
byte[] blob) |
Modifier and Type | Method and Description |
---|---|
static HistoricalData |
denull(HistoricalData historicalData_nullable) |
static HistoricalData |
fromCursor(android.database.Cursor cursor) |
java.lang.String |
getBlob_string()
Attempts to parse
getBlob() as a UTF-8 string. |
byte[] |
getBlob()
Returns the data instance (WARNING: not cloned) passed into the constructor.
|
java.util.Date |
getEpochTime_date()
Convenience to return the timestamp as a
Date instance. |
java.lang.String |
getEpochTime_dateString(java.text.DateFormat dateFormat)
Convenience to return the timestamp as a formatted string, for example pass
new SimpleDateFormat("MM/dd/yyyy HH:mm:ss") . |
long |
getEpochTime_millis()
Convenience to return the epoch time as milliseconds since 1970.
|
EpochTime |
getEpochTime()
Returns the timestamp passed into the constructor.
|
boolean |
isNull()
Checks if this is referentially equal to
NULL . |
java.lang.String |
toString() |
public static final HistoricalData NULL
null
and
is used everywhere Java's would otherwise be used.public HistoricalData(long millisecondsSince1970, byte[] blob)
public HistoricalData(EpochTime epochTime, byte[] blob)
public HistoricalData(byte[] blob, long millisecondsSince1970)
public HistoricalData(byte[] blob, EpochTime epochTime)
public HistoricalData(byte[] blob)
public static HistoricalData denull(HistoricalData historicalData_nullable)
public static HistoricalData fromCursor(android.database.Cursor cursor)
public EpochTime getEpochTime()
public java.util.Date getEpochTime_date()
Date
instance.public long getEpochTime_millis()
public java.lang.String getEpochTime_dateString(java.text.DateFormat dateFormat)
new SimpleDateFormat("MM/dd/yyyy HH:mm:ss")
.public java.lang.String getBlob_string()
getBlob()
as a UTF-8 string.public byte[] getBlob()
public boolean isNull()
NULL
.isNull
in interface UsesCustomNull
public java.lang.String toString()
toString
in class java.lang.Object