Java Doc for TimeOfDay.java in  » J2EE » wicket » wicket » util » time » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » wicket » wicket.util.time 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


wicket.util.time.AbstractTimeValue
   wicket.util.time.AbstractTime
      wicket.util.time.TimeOfDay

TimeOfDay
final public class TimeOfDay extends AbstractTime (Code)
An immutable time of day value represented as milliseconds since the most recent midnight.

Values can be constructed using various factory methods:

  • valueOf(long) where long is milliseconds since midnight
  • valueOf(String) where the string is in h.mma format
  • valueOf(Calendar, String) where the string is in h.mma format
  • valueOf(Duration) where duration is time since midnight
  • valueOf(Time) where time is some point in time today
  • valueOf(Calendar, Time) where time is some point in time today
  • militaryTime(int hour, int minute, int second) for 24 hour time
  • time(int hour, int minute, Meridian) where Meridian is AM or PM
  • time(int hour, int minute, int second, Meridian) where Meridian is AM or PM
  • now() to construct the current time of day
  • now(Calendar) to construct the current time of day using a given calendar

If an attempt is made to construct an illegal time of day value (one that is greater than 24 hours worth of milliseconds), an IllegalArgumentException will be thrown.

Military hours, minutes and seconds of the time of day can be retrieved by calling hour(), minute() and second().

The next occurrence of a given time of day can be retrieved by calling next() or next(Calendar).
author:
   Jonathan Locke


Inner Class :final public static class Meridian extends EnumeratedType

Field Summary
final public static  MeridianAM
     Constant for AM time.
final public static  TimeOfDayMIDNIGHT
     Constant for midnight.
final public static  TimeOfDayNOON
     Constant for noon.
final public static  MeridianPM
     Constant for PM time.


Method Summary
public  inthour()
     Gets the hour of the day.
public static  TimeOfDaymilitaryTime(int hour, int minute, int second)
     Gets a time of day value on a 24 hour clock.
public  intminute()
     Gets the minute.
public  Timenext()
     Gets the next occurrence of this time of day in localtime.
public  Timenext(Calendar calendar)
     Gets the next occurence of this time of day on the given calendar.
public static  TimeOfDaynow()
     Gets the time of day it is now.
public static  TimeOfDaynow(Calendar calendar)
     Gets the time of day it is now on the given calendar.
public  intsecond()
     Gets the second.
public static  TimeOfDaytime(int hour, int minute, int second, Meridian meridian)
     Gets a time of day on a 12 hour clock.
public static  TimeOfDaytime(int hour, int minute, Meridian meridian)
     Gets a time of day on a 12 hour clock.
public  StringtoString()
    
public static  TimeOfDayvalueOf(Calendar calendar, String time)
     Converts to TimeOfDay instance.
public static  TimeOfDayvalueOf(Calendar calendar, Time time)
     Converts to TimeOfDay instance.
public static  TimeOfDayvalueOf(Duration duration)
     Converts to TimeOfDay instance.
public static  TimeOfDayvalueOf(long time)
     Converts to TimeOfDay instance.
public static  TimeOfDayvalueOf(String time)
     Converts to TimeOfDay instance.
public static  TimeOfDayvalueOf(Time time)
     Converts to TimeOfDay instance.

Field Detail
AM
final public static Meridian AM(Code)
Constant for AM time.



MIDNIGHT
final public static TimeOfDay MIDNIGHT(Code)
Constant for midnight.



NOON
final public static TimeOfDay NOON(Code)
Constant for noon.



PM
final public static Meridian PM(Code)
Constant for PM time.





Method Detail
hour
public int hour()(Code)
Gets the hour of the day. The hour of the day (0-23)



militaryTime
public static TimeOfDay militaryTime(int hour, int minute, int second)(Code)
Gets a time of day value on a 24 hour clock.
Parameters:
  hour - The hour (0-23)
Parameters:
  minute - The minute (0-59)
Parameters:
  second - The second (0-59) The time of day



minute
public int minute()(Code)
Gets the minute. The minute (0-59)



next
public Time next()(Code)
Gets the next occurrence of this time of day in localtime. The next occurrence of this time of day in localtime



next
public Time next(Calendar calendar)(Code)
Gets the next occurence of this time of day on the given calendar.
Parameters:
  calendar - The calendar to use The next occurrence of this time of day on the given calendar



now
public static TimeOfDay now()(Code)
Gets the time of day it is now. The time of day it is now



now
public static TimeOfDay now(Calendar calendar)(Code)
Gets the time of day it is now on the given calendar.
Parameters:
  calendar - The calendar to use The time of day it is now on the given calendar



second
public int second()(Code)
Gets the second. The second (0-59)



time
public static TimeOfDay time(int hour, int minute, int second, Meridian meridian)(Code)
Gets a time of day on a 12 hour clock.
Parameters:
  hour - The hour (1-12)
Parameters:
  minute - The minute (0-59)
Parameters:
  second - The second (0-59)
Parameters:
  meridian - AM/PM The time value



time
public static TimeOfDay time(int hour, int minute, Meridian meridian)(Code)
Gets a time of day on a 12 hour clock.
Parameters:
  hour - The hour (1-12)
Parameters:
  minute - The minute (0-59)
Parameters:
  meridian - AM/PM The time value



toString
public String toString()(Code)

See Also:   Object.toString



valueOf
public static TimeOfDay valueOf(Calendar calendar, String time) throws ParseException(Code)
Converts to TimeOfDay instance.
Parameters:
  calendar - The calendar to use when parsing time string
Parameters:
  time - A string in h.mma format The time of day on the given calendar
throws:
  ParseException -



valueOf
public static TimeOfDay valueOf(Calendar calendar, Time time)(Code)
Converts to TimeOfDay instance.
Parameters:
  calendar - The calendar to use when converting time value
Parameters:
  time - The time to convert to a time of day The time of day for this time



valueOf
public static TimeOfDay valueOf(Duration duration)(Code)
Converts to TimeOfDay instance.
Parameters:
  duration - The duration The time of day for the duration since midnight



valueOf
public static TimeOfDay valueOf(long time)(Code)
Converts to TimeOfDay instance.
Parameters:
  time - The time in milliseconds today The time of day



valueOf
public static TimeOfDay valueOf(String time) throws ParseException(Code)
Converts to TimeOfDay instance.
Parameters:
  time - A string in h.mma format The time of day on the given calendar
throws:
  ParseException -



valueOf
public static TimeOfDay valueOf(Time time)(Code)
Converts to TimeOfDay instance.
Parameters:
  time - Time to convert to time of day The time of day in the current timezone



Fields inherited from wicket.util.time.AbstractTime
final static Calendar localtime(Code)(Java Doc)
final static SimpleDateFormat timeFormat(Code)(Java Doc)

Methods inherited from wicket.util.time.AbstractTime
final public boolean after(AbstractTimeValue that)(Code)(Java Doc)
final public boolean before(AbstractTimeValue that)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public String toTimeString()(Code)(Java Doc)
final public String toTimeString(Calendar calendar)(Code)(Java Doc)

Methods inherited from wicket.util.time.AbstractTimeValue
final public long getMilliseconds()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.