microsoft.exchange.webservices.data.misc
Class Time

java.lang.Object
  extended by microsoft.exchange.webservices.data.misc.Time

public final class Time
extends Object

Represents time.


Constructor Summary
protected Time()
          Initializes a new instance of Time.
  Time(Date dateTime)
          Initializes a new instance of Time.
protected Time(int minutes)
          Initializes a new instance of Time.
protected Time(int hours, int minutes, int seconds)
          Initializes a new instance of Time.
 
Method Summary
protected  int convertToMinutes()
          Converts the time into a number of minutes since 12:00AM.
protected  int getHours()
          Gets the hours.
protected  int getMinutes()
          Gets the minutes.
protected  int getSeconds()
          Gets the seconds.
protected  void setHours(int value)
          sets the hours.
protected  void setMinutes(int value)
          Sets the minutes.
protected  void setSeconds(int value)
          Sets the seconds.
 String toXSTime()
          Convert Time to XML Schema time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

protected Time()
Initializes a new instance of Time.


Time

protected Time(int minutes)
        throws ArgumentException
Initializes a new instance of Time.

Parameters:
minutes - The number of minutes since 12:00AM.
Throws:
ArgumentException - the argument exception

Time

public Time(Date dateTime)
     throws ArgumentException
Initializes a new instance of Time.

Parameters:
dateTime - the date time
Throws:
ArgumentException - the argument exception

Time

protected Time(int hours,
               int minutes,
               int seconds)
Initializes a new instance of Time.

Parameters:
hours - the hours
minutes - the minutes
seconds - the seconds
Method Detail

toXSTime

public String toXSTime()
Convert Time to XML Schema time.

Returns:
String in XML Schema time format

convertToMinutes

protected int convertToMinutes()
Converts the time into a number of minutes since 12:00AM.

Returns:
The number of minutes since 12:00AM the time represents.

getHours

protected int getHours()
Gets the hours.

Returns:
the hours

setHours

protected void setHours(int value)
                 throws ArgumentException
sets the hours.

Parameters:
value - the new hours
Throws:
ArgumentException - the argument exception

getMinutes

protected int getMinutes()
Gets the minutes.

Returns:
the minutes

setMinutes

protected void setMinutes(int value)
                   throws ArgumentException
Sets the minutes.

Parameters:
value - the new minutes
Throws:
ArgumentException - the argument exception

getSeconds

protected int getSeconds()
Gets the seconds.

Returns:
the seconds

setSeconds

protected void setSeconds(int value)
                   throws ArgumentException
Sets the seconds.

Parameters:
value - the new seconds
Throws:
ArgumentException - the argument exception


Copyright © 2012–2015 Microsoft. All rights reserved.