Save This Page
Home » tapestry-src-5.0.19 » org.apache.tapestry5.ioc.util » [javadoc | source]
org.apache.tapestry5.ioc.util
public class: TimeInterval [javadoc | source]
java.lang.Object
   org.apache.tapestry5.ioc.util.TimeInterval
Used to represent a period of time, specifically as a configuration value. This is often used to specify timeouts.

TimePeriods are parsed from strings.

The string specifys a number of terms. The values of all the terms are summed together to form the total time period. Each term consists of a number followed by a unit. Units (from largest to smallest) are:

y
year
d
day
h
hour
m
minute
s
second
ms
millisecond

Example: "2 h 30 m". By convention, terms are specified largest to smallest. A term without a unit is assumed to be milliseconds. Units are case insensitive ("h" or "H" are treated the same).
Constructor:
 public TimeInterval(String input) 
    Creates a TimeInterval for a string.
    Parameters:
    input - the string specifying the amount of time in the period
Method from org.apache.tapestry5.ioc.util.TimeInterval Summary:
equals,   milliseconds,   parseMilliseconds,   seconds,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.ioc.util.TimeInterval Detail:
 public boolean equals(Object obj) 
 public long milliseconds() 
 static long parseMilliseconds(String input) 
 public long seconds() 
 public String toString()