All Implemented Interfaces:
Serializable, Comparable<Year>, Temporal, TemporalAccessor, TemporalAdjuster

  • Field Summary

    Fields

    static final int

    The maximum supported year, '+999,999,999'.

    static final int

    The minimum supported year, '-999,999,999'.

  • Method Summary

    Adjusts the specified temporal object to have this year.

    atDay(int dayOfYear)

    Combines this year with a day-of-year to create a LocalDate.

    atMonth(int month)

    Combines this year with a month to create a YearMonth.

    Combines this year with a month to create a YearMonth.

    Combines this year with a month-day to create a LocalDate.

    int

    Compares this year to another year.

    boolean

    Checks if this year is equal to another year.

    Formats this year using the specified formatter.

    Obtains an instance of Year from a temporal object.

    int

    Gets the value of the specified field from this year as an int.

    long

    Gets the value of the specified field from this year as a long.

    int

    getValue()

    int

    hashCode()

    A hash code for this year.

    boolean

    Checks if this year is after the specified year.

    boolean

    Checks if this year is before the specified year.

    boolean

    isLeap()

    Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

    static boolean

    isLeap(long year)

    Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

    boolean

    Checks if the specified field is supported.

    boolean

    Checks if the specified unit is supported.

    boolean

    Checks if the month-day is valid for this year.

    int

    length()

    Gets the length of this year in days.

    Returns a copy of this year with the specified amount subtracted.

    Returns a copy of this year with the specified amount subtracted.

    minusYears(long yearsToSubtract)

    Returns a copy of this Year with the specified number of years subtracted.

    now()

    Obtains the current year from the system clock in the default time-zone.

    Obtains the current year from the specified clock.

    Obtains the current year from the system clock in the specified time-zone.

    of(int isoYear)

    Obtains an instance of Year.

    Obtains an instance of Year from a text string such as 2007.

    Obtains an instance of Year from a text string using a specific formatter.

    Returns a copy of this year with the specified amount added.

    Returns a copy of this year with the specified amount added.

    plusYears(long yearsToAdd)

    Returns a copy of this Year with the specified number of years added.

    <R> R

    Queries this year using the specified query.

    Gets the range of valid values for the specified field.

    toString()

    Outputs this year as a String.

    long

    Calculates the amount of time until another year in terms of the specified unit.

    Returns an adjusted copy of this year.

    Returns a copy of this year with the specified field set to a new value.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Field Details

    • MIN_VALUE

    • MAX_VALUE

  • Method Details

    • now

    • now

    • now

    • of

    • from

    • parse

    • parse

    • isLeap

    • getValue

    • isSupported

    • isSupported

    • range

    • get

    • getLong

    • isLeap

    • isValidMonthDay

    • length

    • with

    • with

    • plus

    • plus

    • plusYears

    • minus

    • minus

    • minusYears

    • query

    • adjustInto

    • until

    • format

    • atDay

    • atMonth

    • atMonth

    • atMonthDay

    • compareTo

    • isAfter

    • isBefore

    • equals

    • hashCode

    • toString