public class Duration extends Object
Constructor and Description |
---|
Duration(int years,
int months,
int weeks,
int days)
Creates a duration by specifying a value for each of its fields.
|
Duration(int years,
int months,
int weeks,
int days,
int hours)
Creates a duration by specifying a value for each of its fields.
|
Modifier and Type | Method and Description |
---|---|
int |
getDays() |
int |
getHours() |
int |
getMonths() |
int |
getWeeks() |
int |
getYears() |
public Duration(int years, int months, int weeks, int days)
years
- The number of yearsmonths
- The number of monthsweeks
- The number of weeksdays
- The number of dayspublic Duration(int years, int months, int weeks, int days, int hours)
years
- The number of yearsmonths
- The number of monthsweeks
- The number of weeksdays
- The number of dayspublic int getYears()
public int getMonths()
public int getWeeks()
public int getDays()
public int getHours()
Copyright © 2004–2021 XWiki. All rights reserved.