Class IslamicChronology.LeapYearPatternType

java.lang.Object
org.joda.time.chrono.IslamicChronology.LeapYearPatternType
All Implemented Interfaces:
Serializable
Enclosing class:
IslamicChronology

public static class IslamicChronology.LeapYearPatternType extends Object implements Serializable
Opaque object describing a leap year pattern for the Islamic Chronology.
Since:
1.2
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final byte
    The index.
    (package private) final int
    The leap year pattern, a bit-based 1=true pattern.
    private static final long
    Serialization lock
  • Constructor Summary

    Constructors
    Constructor
    Description
    LeapYearPatternType(int index, int pattern)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    (package private) boolean
    isLeapYear(int year)
    Is the year a leap year.
    private Object
    Ensure a singleton is returned if possible.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization lock
      See Also:
    • index

      final byte index
      The index.
    • pattern

      final int pattern
      The leap year pattern, a bit-based 1=true pattern.
  • Constructor Details

    • LeapYearPatternType

      LeapYearPatternType(int index, int pattern)
      Constructor. This constructor takes a bit pattern where bits 0-29 correspond to years 0-29 in the 30 year Islamic cycle of years. This allows a highly efficient lookup by bit-matching.
      Parameters:
      index - the index
      pattern - the bit pattern
  • Method Details

    • isLeapYear

      boolean isLeapYear(int year)
      Is the year a leap year.
      Parameters:
      year - the year to query
      Returns:
      true if leap
    • readResolve

      private Object readResolve()
      Ensure a singleton is returned if possible.
      Returns:
      the singleton instance
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object