Class IslamicChronology.LeapYearPatternType

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    IslamicChronology

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

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      (package private) boolean isLeapYear​(int year)
      Is the year a leap year.
      private java.lang.Object readResolve()
      Ensure a singleton is returned if possible.
      • Methods inherited from class java.lang.Object

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

      • serialVersionUID

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

        final byte index
        The index.
      • pattern

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

      • 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 Detail

      • isLeapYear

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object