Class FrenchRepublicanCalendar.Date

java.lang.Object
net.time4j.calendar.frenchrev.FrenchRepublicanCalendar.Date
All Implemented Interfaces:
ChronoDisplay
Enclosing class:
FrenchRepublicanCalendar

public static final class FrenchRepublicanCalendar.Date extends Object implements ChronoDisplay

Static view of calendar date taking into account possibly different calendar algorithms.

Note: Only elements registered in the French republican calendar chronology are supported.

Since:
3.33/4.28
See Also:
FrenchRepublicanCalendar.getDate(FrenchRepublicanAlgorithm), FrenchRepublicanAlgorithm.attribute()
  • Method Details

    • contains

      public boolean contains(ChronoElement<?> element)
      Description copied from interface: ChronoDisplay

      Queries if the value for given chronological element can be accessed via get(element).

      If the argument is missing then this method will yield false. Note: Elements which are not registered but define a suitable rule are also accessible.

      Specified by:
      contains in interface ChronoDisplay
      Parameters:
      element - chronological element to be asked (optional)
      Returns:
      true if the element is registered or there is an element rule for evaluating the value else false
      See Also:
      ChronoDisplay.get(ChronoElement)
    • get

      public <V> V get(ChronoElement<V> element)
      Description copied from interface: ChronoDisplay

      Returns the partial value associated with given chronological element.

      Specified by:
      get in interface ChronoDisplay
      Type Parameters:
      V - generic type of element value
      Parameters:
      element - element which has the value
      Returns:
      associated element value as object (never null)
      See Also:
      ChronoDisplay.contains(ChronoElement)
    • getInt

      public int getInt(ChronoElement<Integer> element)
      Description copied from interface: ChronoDisplay

      Returns the partial value associated with given chronological element.

      Specified by:
      getInt in interface ChronoDisplay
      Parameters:
      element - element which has the value
      Returns:
      associated element value as int primitive or Integer.MIN_VALUE if not available
      See Also:
      ChronoDisplay.get(ChronoElement)
    • getMinimum

      public <V> V getMinimum(ChronoElement<V> element)
      Description copied from interface: ChronoDisplay

      Yields the minimum value of given chronological element in the current context of this object.

      The definition of a minimum and a maximum does generally not imply that every intermediate value between minimum and maximum is valid in this context. For example in the timezone Europe/Berlin the hour [T02:00] will be invalid if switching to summer time.

      In most cases the minimum value is not dependent on this context.

      Specified by:
      getMinimum in interface ChronoDisplay
      Type Parameters:
      V - generic type of element value
      Parameters:
      element - element whose minimum value is to be evaluated
      Returns:
      minimum maybe context-dependent element value
      See Also:
      ChronoElement.getDefaultMinimum(), ChronoDisplay.getMaximum(ChronoElement)
    • getMaximum

      public <V> V getMaximum(ChronoElement<V> element)
      Description copied from interface: ChronoDisplay

      Yields the maximum value of given chronological element in the current context of this object.

      Maximum values are different from minimum case often dependent on the context. An example is the element SECOND_OF_MINUTE whose maximum is normally 59 but can differ in UTC-context with leap seconds. Another more common example is the maximum of the element DAY_OF_MONTH (28-31) which is dependent on the month and year of this context (leap years!).

      Note: In timezone-related timestamps possible offset jumps inducing gaps on the local timeline will be conserved. That means that minimum and maximum do not guarantee a continuum of valid intermediate values.

      Specified by:
      getMaximum in interface ChronoDisplay
      Type Parameters:
      V - generic type of element value
      Parameters:
      element - element whose maximum value is to be evaluated
      Returns:
      maximum maybe context-dependent element value
      See Also:
      ChronoElement.getDefaultMaximum(), ChronoDisplay.getMinimum(ChronoElement)
    • hasTimezone

      public boolean hasTimezone()

      This date has no timezone (offset).

      Specified by:
      hasTimezone in interface ChronoDisplay
      Returns:
      false
    • getTimezone

      public TZID getTimezone()

      Always throws an exception.

      Specified by:
      getTimezone in interface ChronoDisplay
      Returns:
      (nothing)
      Throws:
      ChronoException - (always)
      See Also:
      ChronoDisplay.hasTimezone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object