| Package | Description |
|---|---|
| org.threeten.extra |
Value types and utilities that extend
java.time.*. |
| Modifier and Type | Field | Description |
|---|---|---|
static Years |
Years.ONE |
A constant for one year.
|
static Years |
Years.ZERO |
A constant for zero years.
|
| Modifier and Type | Method | Description |
|---|---|---|
Years |
Years.abs() |
Returns a copy of this duration with a positive length.
|
static Years |
Years.between(Temporal startDateInclusive,
Temporal endDateExclusive) |
Obtains a
Years consisting of the number of years between two dates. |
Years |
Years.dividedBy(int divisor) |
Returns an instance with the amount divided by the specified divisor.
|
static Years |
Years.from(TemporalAmount amount) |
Obtains an instance of
Years from a temporal amount. |
Years |
Years.minus(int years) |
Returns a copy of this amount with the specified number of years subtracted.
|
Years |
Years.minus(TemporalAmount amountToAdd) |
Returns a copy of this amount with the specified amount subtracted.
|
Years |
Years.multipliedBy(int scalar) |
Returns an instance with the amount multiplied by the specified scalar.
|
Years |
Years.negated() |
Returns an instance with the amount negated.
|
static Years |
Years.of(int years) |
Obtains a
Years representing a number of years. |
static Years |
Years.parse(CharSequence text) |
Obtains a
Years from a text string such as PnY. |
Years |
Years.plus(int years) |
Returns a copy of this amount with the specified number of years added.
|
Years |
Years.plus(TemporalAmount amountToAdd) |
Returns a copy of this amount with the specified amount added.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
Years.compareTo(Years otherAmount) |
Compares this amount to the specified
Years. |
Copyright © 2010–2019 ThreeTen.org. All rights reserved.