/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Checks if this chronology instance equals another. * * @param obj the object to compare to * @return true if equal * @since 1.6 */ public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof GJChronology) { GJChronology chrono = (GJChronology) obj; return iCutoverMillis == chrono.iCutoverMillis && getMinimumDaysInFirstWeek() == chrono.getMinimumDaysInFirstWeek() && getZone().equals(chrono.getZone()); } return false; }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Checks if this chronology instance equals another. * * @param obj the object to compare to * @return true if equal * @since 1.6 */ public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof GJChronology) { GJChronology chrono = (GJChronology) obj; return iCutoverMillis == chrono.iCutoverMillis && getMinimumDaysInFirstWeek() == chrono.getMinimumDaysInFirstWeek() && getZone().equals(chrono.getZone()); } return false; }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return "GJ".hashCode() * 11 + getZone().hashCode() + getMinimumDaysInFirstWeek() + iCutoverInstant.hashCode(); }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return "GJ".hashCode() * 11 + getZone().hashCode() + getMinimumDaysInFirstWeek() + iCutoverInstant.hashCode(); }
/** * Gets the Chronology in a specific time zone. * * @param zone the zone to get the chronology in, null is default * @return the chronology */ public Chronology withZone(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } if (zone == getZone()) { return this; } return getInstance(zone, iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Gets the Chronology in a specific time zone. * * @param zone the zone to get the chronology in, null is default * @return the chronology */ public Chronology withZone(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } if (zone == getZone()) { return this; } return getInstance(zone, iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Gets a debugging toString. * * @return a debugging string */ public String toString() { StringBuffer sb = new StringBuffer(60); sb.append("GJChronology"); sb.append('['); sb.append(getZone().getID()); if (iCutoverMillis != DEFAULT_CUTOVER.getMillis()) { sb.append(",cutover="); DateTimeFormatter printer; if (withUTC().dayOfYear().remainder(iCutoverMillis) == 0) { printer = ISODateTimeFormat.date(); } else { printer = ISODateTimeFormat.dateTime(); } printer.withChronology(withUTC()).printTo(sb, iCutoverMillis); } if (getMinimumDaysInFirstWeek() != 4) { sb.append(",mdfw="); sb.append(getMinimumDaysInFirstWeek()); } sb.append(']'); return sb.toString(); }
/** * Gets a debugging toString. * * @return a debugging string */ public String toString() { StringBuffer sb = new StringBuffer(60); sb.append("GJChronology"); sb.append('['); sb.append(getZone().getID()); if (iCutoverMillis != DEFAULT_CUTOVER.getMillis()) { sb.append(",cutover="); DateTimeFormatter printer; if (withUTC().dayOfYear().remainder(iCutoverMillis) == 0) { printer = ISODateTimeFormat.date(); } else { printer = ISODateTimeFormat.dateTime(); } printer.withChronology(withUTC()).printTo(sb, iCutoverMillis); } if (getMinimumDaysInFirstWeek() != 4) { sb.append(",mdfw="); sb.append(getMinimumDaysInFirstWeek()); } sb.append(']'); return sb.toString(); }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Gets the Chronology in a specific time zone. * * @param zone the zone to get the chronology in, null is default * @return the chronology */ public Chronology withZone(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } if (zone == getZone()) { return this; } return getInstance(zone, iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Gets a debugging toString. * * @return a debugging string */ public String toString() { StringBuffer sb = new StringBuffer(60); sb.append("GJChronology"); sb.append('['); sb.append(getZone().getID()); if (iCutoverMillis != DEFAULT_CUTOVER.getMillis()) { sb.append(",cutover="); DateTimeFormatter printer; if (withUTC().dayOfYear().remainder(iCutoverMillis) == 0) { printer = ISODateTimeFormat.date(); } else { printer = ISODateTimeFormat.dateTime(); } printer.withChronology(withUTC()).printTo(sb, iCutoverMillis); } if (getMinimumDaysInFirstWeek() != 4) { sb.append(",mdfw="); sb.append(getMinimumDaysInFirstWeek()); } sb.append(']'); return sb.toString(); }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * Serialization singleton */ private Object readResolve() { return getInstance(getZone(), iCutoverInstant, getMinimumDaysInFirstWeek()); }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return "GJ".hashCode() * 11 + getZone().hashCode() + getMinimumDaysInFirstWeek() + iCutoverInstant.hashCode(); }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return "GJ".hashCode() * 11 + getZone().hashCode() + getMinimumDaysInFirstWeek() + iCutoverInstant.hashCode(); }
/** * A suitable hash code for the chronology. * * @return the hash code * @since 1.6 */ public int hashCode() { return "GJ".hashCode() * 11 + getZone().hashCode() + getMinimumDaysInFirstWeek() + iCutoverInstant.hashCode(); }