Timestamp (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>
-
Constructor Summary
Constructors
-
Method Summary
booleanIndicates whether this
Timestampobject is later than the givenTimestampobject.booleanIndicates whether this
Timestampobject is earlier than the givenTimestampobject.intCompares this
Timestampobject to the givenTimestampobject.intCompares this
Timestampobject to the givenDateobject.booleanTests to see if this
Timestampobject is equal to the given object.booleanTests to see if this
Timestampobject is equal to the givenTimestampobject.Obtains an instance of
Timestampfrom anInstantobject.intgetNanos()Gets this
Timestampobject'snanosvalue.longgetTime()Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this
Timestampobject.inthashCode()Returns a hash code value for this Timestamp.
voidsetNanos(int n) Sets this
Timestampobject'snanosfield to the given value.voidsetTime(long time) Sets this
Timestampobject to represent a point in time that istimemilliseconds after January 1, 1970 00:00:00 GMT.Converts this
Timestampobject to anInstant.Converts this
Timestampobject to aLocalDateTime.toString()Formats a timestamp in JDBC timestamp escape format.
Converts a
Stringobject in JDBC timestamp escape format to aTimestampvalue.Obtains an instance of
Timestampfrom aLocalDateTimeobject, with the same year, month, day of month, hours, minutes, seconds and nanos date-time value as the providedLocalDateTime.Methods declared in class Date
after, before, clone, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTCbooleanTests if this date is after the specified date.
booleanTests if this date is before the specified date.
Return a copy of this object.
intintintintintintintintstatic longvoidvoidvoidvoidvoidvoidstatic longUTC(int year, int month, int date, int hrs, int min, int sec) Methods declared in class Object
finalize, getClass, notify, notifyAll, wait, wait, waitprotected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
Timestamp
-
Timestamp
-
-
Method Details
-
setTime
-
getTime
-
valueOf
-
toString
-
getNanos
-
setNanos
-
equals
-
equals
-
before
-
after
-
compareTo
-
compareTo
-
hashCode
-
valueOf
-
toLocalDateTime
-
from
-
toInstant
-