public class TimePointSec extends Object implements ByteTransformable
| Constructor and Description |
|---|
TimePointSec(long dateTime)
Create a new TimePointSec object by providing the date as a timestamp.
|
TimePointSec(String dateTime)
Default constructor used to deserialize a json String into a date.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object otherTimePointSec) |
String |
getDateTime()
This method returns the date as its String representation.
|
Date |
getDateTimeAsDate()
Get the configured date as a
Date object. |
int |
getDateTimeAsInt()
This method returns the data as its int representation.
|
long |
getDateTimeAsTimestamp()
This method returns the data as its timestamp representation.
|
int |
hashCode() |
void |
setDateTime(long dateTime)
Set the date by providing a timestamp.
|
void |
setDateTime(String dateTime)
Set the date.
|
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
public TimePointSec(String dateTime)
The date has to be specified as String and needs a special format: yyyy-MM-dd'T'HH:mm:ss
Example: "2016-08-08T12:24:17"
dateTime - The date in its String representation.public TimePointSec(long dateTime)
dateTime - The date as a timestamp.public String getDateTime()
public void setDateTime(String dateTime) throws ParseException
Example: "2016-08-08T12:24:17"
dateTime - The date as its String representation.ParseException - If the given String does not match the pattern.public void setDateTime(long dateTime)
dateTime - The date as a timestamp.public Date getDateTimeAsDate()
Date object.public int getDateTimeAsInt()
public long getDateTimeAsTimestamp()
public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformabletoByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.Copyright © 2019. All rights reserved.