public final class

StrictChronology

extends AssembledChronology
java.lang.Object
   ↳ org.joda.time.Chronology
     ↳ org.joda.time.chrono.BaseChronology
       ↳ org.joda.time.chrono.AssembledChronology
         ↳ org.joda.time.chrono.StrictChronology

Class Overview

Wraps another Chronology, ensuring all the fields are strict.

StrictChronology is thread-safe and immutable.

Summary

Public Methods
boolean equals(Object obj)
A strict chronology is only equal to a strict chronology with the same base chronology.
static StrictChronology getInstance(Chronology base)
Create a StrictChronology for any chronology.
int hashCode()
A suitable hashcode for the chronology.
String toString()
A debugging string for the chronology.
Chronology withUTC()
Returns an instance of this Chronology that operates in the UTC time zone.
Chronology withZone(DateTimeZone zone)
Returns an instance of this Chronology that operates in any time zone.
Protected Methods
void assemble(AssembledChronology.Fields fields)
Invoked by the constructor and after deserialization to allow subclasses to define all of its supported fields.
[Expand]
Inherited Methods
From class org.joda.time.chrono.AssembledChronology
From class org.joda.time.chrono.BaseChronology
From class org.joda.time.Chronology
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

A strict chronology is only equal to a strict chronology with the same base chronology.

Parameters
obj the object to compare to
Returns
  • true if equal

public static StrictChronology getInstance (Chronology base)

Create a StrictChronology for any chronology.

Parameters
base the chronology to wrap
Throws
IllegalArgumentException if chronology is null

public int hashCode ()

A suitable hashcode for the chronology.

Returns
  • the hashcode

public String toString ()

A debugging string for the chronology.

Returns
  • the debugging string

public Chronology withUTC ()

Returns an instance of this Chronology that operates in the UTC time zone. Chronologies that do not operate in a time zone or are already UTC must return themself.

Returns
  • a version of this chronology that ignores time zones

public Chronology withZone (DateTimeZone zone)

Returns an instance of this Chronology that operates in any time zone.

Parameters
zone to use, or default if null
Returns
  • a version of this chronology with a specific time zone

Protected Methods

protected void assemble (AssembledChronology.Fields fields)

Invoked by the constructor and after deserialization to allow subclasses to define all of its supported fields. All unset fields default to unsupported instances.

Parameters
fields container of fields