Package | Description |
---|---|
org.threeten.extra |
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(java.time.temporal.Temporal startDateInclusive,
java.time.temporal.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(java.time.temporal.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(java.time.temporal.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(java.lang.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(java.time.temporal.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–2018 ThreeTen.org. All rights reserved.