API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.sql. Time View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      Date
          Time
Implements
Subclasses
Description
public class Time
  A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.
See also:   
Constructors
@Deprecated
public Time (int hour, int minute, int second)
  Constructs a Time object initialized with the given values for the hour, minute, and second.
public Time (long time)
  Constructs a Time object using a milliseconds time value.
Methods
Hide/Show inherited methods
public boolean after (Date when) [Inherited From Date]
  Tests if this date is after the specified date.
public boolean before (Date when) [Inherited From Date]
  Tests if this date is before the specified date.
public Object clone () [Inherited From Date]
Return a copy of this object.
public int compareTo (Date anotherDate) [Inherited From Date]
  Compares two Dates for ordering.
public boolean equals (Object obj) [Inherited From Date]
  Compares two dates for equality.
@Deprecated
public int getDate () [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a date component.
@Deprecated
public int getDay () [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a day component.
@Deprecated
public int getHours () [Inherited From Date]
  Returns the hour represented by this Date object.
@Deprecated
public int getMinutes () [Inherited From Date]
  Returns the number of minutes past the hour represented by this date, as interpreted in the local time zone.
@Deprecated
public int getMonth () [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a month component.
@Deprecated
public int getSeconds () [Inherited From Date]
  Returns the number of seconds past the minute represented by this date.
public long getTime () [Inherited From Date]
  Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
@Deprecated
public int getTimezoneOffset () [Inherited From Date]
  Returns the offset, measured in minutes, for the local time zone relative to UTC that is appropriate for the time represented by this Date object.
@Deprecated
public int getYear () [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a year component.
public int hashCode () [Inherited From Date]
  Returns a hash code value for this object.
@Deprecated
publicstatic long parse (String s) [Inherited From Date]
  Attempts to interpret the string s as a representation of a date and time.
@Deprecated
public void setDate (int i) [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a date component.
@Deprecated
public void setHours (int hours) [Inherited From Date]
  Sets the hour of this Date object to the specified value.
@Deprecated
public void setMinutes (int minutes) [Inherited From Date]
  Sets the minutes of this Date object to the specified value.
@Deprecated
public void setMonth (int i) [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a month component.
@Deprecated
public void setSeconds (int seconds) [Inherited From Date]
  Sets the seconds of this Date to the specified value.
public void setTime (long time) [Overrides Date]
  Sets a Time object using a milliseconds time value.
@Deprecated
public void setYear (int i) [Overrides Date]
  This method is deprecated and should not be used because SQL TIME values do not have a year component.
@Deprecated
public String toGMTString () [Inherited From Date]
  Creates a string representation of this Date object of the form:
where:
  • d is the day of the month (1 through 31), as one or two decimal digits.
  • mon is the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec).
  • yyyy is the year, as four decimal digits.
  • hh is the hour of the day (00 through 23), as two decimal digits.
  • mm is the minute within the hour (00 through 59), as two decimal digits.
  • ss is the second within the minute (00 through 61), as two decimal digits.
  • GMT is exactly the ASCII letters "GMT" to indicate Greenwich Mean Time.

The result does not depend on the local time zone.
Returns: a string representation of this date, using the Internet GMT conventions.
See Also: DateFormat, Date.toString(), Date.toLocaleString(),

@Deprecated
public String toLocaleString () [Inherited From Date]
  Creates a string representation of this Date object in an implementation-dependent form.
public String toString () [Overrides Date]
  Formats a time in JDBC time escape format.
@Deprecated
publicstatic long UTC (int year, int month, int date, int hrs, int min, int sec) [Inherited From Date]
  Determines the date and time based on the arguments.
publicstatic Time valueOf (String s)
  Converts a string in JDBC time escape format to a Time value.
Fields
Hide/Show inherited fields
pack-privatefinalstatic long serialVersionUID = "8397324403548013681"
Private serial version unique ID to ensure serialization compatibility.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar