public class Timestamp extends Object implements Comparable<Timestamp>
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Return a copy of this object.
|
int |
compareTo(Timestamp o) |
boolean |
equals(Object other) |
String |
format(DateTimeFormatter formatter) |
int |
getDay() |
int |
getDayOfWeek() |
int |
getHours() |
int |
getMinutes() |
int |
getMonth() |
int |
getNanos() |
int |
getSeconds() |
int |
getYear() |
int |
hashCode() |
static Timestamp |
ofEpochMilli(long epochMilli) |
static Timestamp |
ofEpochMilli(long epochMilli,
int nanos) |
static Timestamp |
ofEpochSecond(long epochSecond) |
static Timestamp |
ofEpochSecond(long epochSecond,
int nanos) |
void |
set(Timestamp t) |
void |
setNanos(int nanos) |
void |
setTimeInMillis(long epochMilli) |
void |
setTimeInMillis(long epochMilli,
int nanos) |
void |
setTimeInSeconds(long epochSecond) |
void |
setTimeInSeconds(long epochSecond,
int nanos) |
long |
toEpochMilli() |
long |
toEpochSecond() |
Timestamp |
toSqlTimestamp() |
String |
toString() |
static Timestamp |
valueOf(String s) |
public Timestamp()
public Timestamp(Timestamp t)
public void set(Timestamp t)
public String format(DateTimeFormatter formatter)
public int compareTo(Timestamp o)
compareTo
in interface Comparable<Timestamp>
public long toEpochSecond()
public void setTimeInSeconds(long epochSecond)
public void setTimeInSeconds(long epochSecond, int nanos)
public long toEpochMilli()
public void setTimeInMillis(long epochMilli)
public void setTimeInMillis(long epochMilli, int nanos)
public int getNanos()
public static Timestamp ofEpochSecond(long epochSecond)
public static Timestamp ofEpochSecond(long epochSecond, int nanos)
public static Timestamp ofEpochMilli(long epochMilli)
public static Timestamp ofEpochMilli(long epochMilli, int nanos)
public void setNanos(int nanos)
public int getYear()
public int getMonth()
public int getDay()
public int getHours()
public int getMinutes()
public int getSeconds()
public int getDayOfWeek()
public Timestamp toSqlTimestamp()
Copyright © 2022 The Apache Software Foundation. All rights reserved.