public class DurationFactory extends Object
Modifier and Type | Field and Description |
---|---|
static Duration |
DAY
A duration of exactly one day.
|
static Duration |
MONTH
A duration of exactly one month
|
static Duration |
WEEK
A duration of exactly one week.
|
static Duration |
YEAR
A duration of exactly one year.
|
Constructor and Description |
---|
DurationFactory() |
Modifier and Type | Method and Description |
---|---|
static Duration |
createDays(int days)
Creates a new Duration instance having just the specified number of days.
|
static Duration |
createDuration(int years,
int months,
int weeks,
int days) |
static Duration |
createMonths(int months)
Creates a new Duration instance having just the specified number of months.
|
static Duration |
createWeeks(int weeks)
Creates a new Duration instance having just the specified number of weeks.
|
static Duration |
createYears(int years)
Creates a new Duration instance having just the specified number of years.
|
static Duration |
getDAY()
Helper method for accessing
DAY static field in velocity. |
static Duration |
getMONTH()
Helper method for accessing
MONTH static field in velocity. |
static Duration |
getWEEK()
Helper method for accessing
WEEK static field in velocity. |
static Duration |
getYEAR()
Helper method for accessing
YEAR static field in velocity. |
public static final Duration DAY
public static final Duration WEEK
public static final Duration MONTH
public static final Duration YEAR
public static Duration createDuration(int years, int months, int weeks, int days)
Duration(int, int, int, int)
public static Duration createDays(int days)
days
- The number of dayspublic static Duration createWeeks(int weeks)
weeks
- The number of weekspublic static Duration createMonths(int months)
months
- The number of monthspublic static Duration createYears(int years)
years
- The number of yearspublic static Duration getMONTH()
MONTH
static field in velocity.Copyright © 2004–2021 XWiki. All rights reserved.