wicket.util.time
Class AbstractTime

java.lang.Object
  extended bywicket.util.value.LongValue
      extended bywicket.util.time.AbstractTimeValue
          extended bywicket.util.time.AbstractTime
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
Time, TimeOfDay

abstract class AbstractTime
extends AbstractTimeValue

Abstract base class for subclasses that represent a point in time (as opposed to a duration of time).

Author:
Jonathan Locke

Field Summary
(package private) static java.util.Calendar localtime
          Calendar for the local timezone
(package private) static java.text.SimpleDateFormat timeFormat
          Time format
 
Fields inherited from class wicket.util.value.LongValue
value
 
Constructor Summary
(package private) AbstractTime(long milliseconds)
          Package local constructor for package subclasses only
 
Method Summary
 boolean after(AbstractTimeValue that)
           
 boolean before(AbstractTimeValue that)
           
 long getMilliseconds()
           
 java.lang.String toString()
          Converts this time to a string suitable for use in a filesystem name
 java.lang.String toTimeString()
          Converts this time to a time string using the formatter h.mma
 java.lang.String toTimeString(java.util.Calendar calendar)
          Converts this time to a date string using the date formatter h.mma
 
Methods inherited from class wicket.util.value.LongValue
compareTo, equals, greaterThan, greaterThan, hashCode, lessThan, lessThan
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

localtime

static final java.util.Calendar localtime
Calendar for the local timezone


timeFormat

static final java.text.SimpleDateFormat timeFormat
Time format

Constructor Detail

AbstractTime

AbstractTime(long milliseconds)
Package local constructor for package subclasses only

Parameters:
milliseconds - The number of milliseconds in this time value
Method Detail

after

public final boolean after(AbstractTimeValue that)
Parameters:
that - The time to compare with
Returns:
True if this time value is after that time value

before

public final boolean before(AbstractTimeValue that)
Parameters:
that - The time to compare with
Returns:
True if this time value is before that time value

toTimeString

public final java.lang.String toTimeString()
Converts this time to a time string using the formatter h.mma

Returns:
The date string

toTimeString

public final java.lang.String toTimeString(java.util.Calendar calendar)
Converts this time to a date string using the date formatter h.mma

Parameters:
calendar - The calendar to use in the conversion
Returns:
The date string

toString

public java.lang.String toString()
Converts this time to a string suitable for use in a filesystem name

Overrides:
toString in class LongValue
Returns:
This time as a formatted string

getMilliseconds

public final long getMilliseconds()
Returns:
Number of milliseconds in this abstract time value


Copyright © 2004-2006 Wicket developers. All Rights Reserved.