Java Client API Reference 6.0.2.61

com.ssaglobal.bde
Class Time

java.lang.Object
  |
  +--com.ssaglobal.bde.Time

public class Time
extends java.lang.Object

Class representing a Time value


Constructor Summary
Time(int hour, int minute, int second)
          Create a new Time object with the given values
Time(long ms)
          Create a Time object using Number of milliseconds since 1 januari, 1970, ignoring the Date Component.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two Time objects
 int getHour()
          Returns the hour
 int getMinute()
          Returns the minutes
 int getSecond()
          Returns the seconds
 long getTime()
          Returns the Number of milliseconds since 1 januari, 1970
 java.lang.String toString()
          Formats a time in JDBC time escape format.
static Time valueOf(java.lang.String s)
          Converts a string in JDBC time escape format to a Time value.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Time

public Time(int hour,
            int minute,
            int second)
Create a new Time object with the given values
Parameters:
hour - the hour
minute - the minutes
second - the seconds

Time

public Time(long ms)
Create a Time object using Number of milliseconds since 1 januari, 1970, ignoring the Date Component.
Parameters:
ms - Number of milliseconds since 1 januari, 1970
Method Detail

getHour

public int getHour()
Returns the hour
Returns:
the hour

getMinute

public int getMinute()
Returns the minutes
Returns:
the minute

getSecond

public int getSecond()
Returns the seconds
Returns:
the seconds

valueOf

public static Time valueOf(java.lang.String s)
Converts a string in JDBC time escape format to a Time value.
Parameters:
s - time in format "hh:mm:ss"
Returns:
a corresponding Time object
Throws:
java.lang.IllegalArgumentException - If String is invalid.

getTime

public long getTime()
Returns the Number of milliseconds since 1 januari, 1970
Returns:
Number of milliseconds since 1 januari, 1970

toString

public java.lang.String toString()
Formats a time in JDBC time escape format.
Overrides:
toString in class java.lang.Object
Returns:
a String in hh:mm:ss format

equals

public boolean equals(java.lang.Object obj)
Compares two Time objects
Overrides:
equals in class java.lang.Object
Parameters:
obj - The Time object to compare
Returns:
true if Times are equal, false if not

Java Client API Reference 6.0.2.61

Visit the SSA Global website for more information.