public class SbeTimestamp extends Object
Constructor and Description |
---|
SbeTimestamp()
Constructs empty object.
|
SbeTimestamp(long value,
TimestampUnit unit,
TimestampEpoch epoch,
short timezoneHour,
short timezoneMinute)
Constructs timestamp
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Check two objects for equality.
|
TimestampEpoch |
getEpoch()
Timstamp epoch.
|
short |
getTimezoneHour()
Timezone hours.
|
short |
getTimezoneMinute()
Timezone minutes.
|
TimestampUnit |
getUnit()
Unit of the timestamp.
|
int |
getUnitWidth()
Width of the unit fraction part (in digits).
|
long |
getValue()
Number of units.
|
int |
hashCode()
Hashcode.
|
void |
setEpoch(TimestampEpoch epoch)
Update timestamp epoch.
|
void |
setTimezoneHour(short timezoneHour)
Update timezone hours.
|
void |
setTimezoneMinute(short timezoneMinute)
Update timezone minutes.
|
void |
setUnit(TimestampUnit unit)
Update unit.
|
void |
setUnitWidth(int value)
Update unit by its precision.
|
void |
setValue(long value)
Update the number of units.
|
String |
toString()
String presentation of the timestamp.
|
void |
update(long value,
TimestampUnit unit,
TimestampEpoch epoch,
short timezoneHour,
short timezoneMinute)
Update entire timestamp
|
public SbeTimestamp()
public SbeTimestamp(long value, TimestampUnit unit, TimestampEpoch epoch, short timezoneHour, short timezoneMinute)
value
- value in units.unit
- unit.epoch
- timestamp epoch.timezoneHour
- hours of timezone.timezoneMinute
- minutes of timezone.public TimestampUnit getUnit()
public int getUnitWidth()
public void setUnit(TimestampUnit unit)
public void setUnitWidth(int value)
public TimestampEpoch getEpoch()
public void setEpoch(TimestampEpoch epoch)
public long getValue()
public void setValue(long value)
public short getTimezoneMinute()
public void setTimezoneMinute(short timezoneMinute)
public short getTimezoneHour()
public void setTimezoneHour(short timezoneHour)
public void update(long value, TimestampUnit unit, TimestampEpoch epoch, short timezoneHour, short timezoneMinute)
value
- value in units.unit
- unit.epoch
- timestamp epoch.timezoneHour
- hours of timezone.timezoneMinute
- minutes of timezone.public String toString()
public boolean equals(Object o)
Copyright © 2005–2024 Onix Solutions. All rights reserved.