Time (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>
-
Constructor Summary
Constructors
-
Method Summary
intgetDate()intgetDay()intgetMonth()intgetYear()voidsetDate(int i) voidsetMonth(int i) voidsetTime(long time) Sets a
Timeobject using a milliseconds time value.voidsetYear(int i) This method always throws an UnsupportedOperationException and should not be used because SQL
Timevalues do not have a date component.Converts this
Timeobject to aLocalTime.toString()Formats a time in JDBC time escape format.
Converts a string in JDBC time escape format to a
Timevalue.Obtains an instance of
Timefrom aLocalTimeobject with the same hour, minute and second time value as the givenLocalTime.Methods declared in class Date
after, before, clone, compareTo, equals, from, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, 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.
intCompares two Dates for ordering.
booleanCompares two dates for equality.
Obtains an instance of
Datefrom anInstantobject.intintintlongReturns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this
Dateobject.intintReturns a hash code value for this object.
static longvoidvoidvoidstatic 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
-
Time
-
Time
-
-
Method Details
-
setTime
-
valueOf
-
toString
-
getYear
-
getMonth
-
getDay
-
getDate
-
setYear
-
setMonth
-
setDate
-
valueOf
-
toLocalTime
-
toInstant
-