org.jbpm.calendar
Class Duration
java.lang.Object
org.jbpm.calendar.Duration
- All Implemented Interfaces:
- Serializable
public class Duration
- extends Object
- implements Serializable
interprets textual descriptions of a duration.
Syntax: <quantity> [business] <unit>
Where
- <quantity> is a piece of text that is parsable with
NumberFormat.getNumberInstance().parse(quantity).
- <unit> is one of {second, seconds, minute, minutes, hour, hours, day, days, week,
weeks, month, months, year, years}.
- And adding the optional indication
business means that only business hours
should be taken into account for this duration.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Duration
public Duration(long milliseconds)
Duration
public Duration(Duration duration)
Duration
public Duration(String duration)
- creates a duration from a textual description. syntax: {number} space {unit} where number
is parsable to a java.lang.Number and unit is one of
- second
- seconds
- minute
- minutes
- hour
- hours
- day
- days
- week
- weeks
- month
- months
- year
- years
addTo
public Date addTo(Date date)
getMilliseconds
public long getMilliseconds()
isBusinessTime
public boolean isBusinessTime()
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.