/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } ISOChronology chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); ISOChronology oldChrono = cCache.putIfAbsent(zone, chrono); if (oldChrono != null) { chrono = oldChrono; } } return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } ISOChronology chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); ISOChronology oldChrono = cCache.putIfAbsent(zone, chrono); if (oldChrono != null) { chrono = oldChrono; } } return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } ISOChronology chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); ISOChronology oldChrono = cCache.putIfAbsent(zone, chrono); if (oldChrono != null) { chrono = oldChrono; } } return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } ISOChronology chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); ISOChronology oldChrono = cCache.putIfAbsent(zone, chrono); if (oldChrono != null) { chrono = oldChrono; } } return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = (ISOChronology) cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }
/** * Gets an instance of the ISOChronology in the given time zone. * * @param zone the time zone to get the chronology in, null is default * @return a chronology in the specified time zone */ public static ISOChronology getInstance(DateTimeZone zone) { if (zone == null) { zone = DateTimeZone.getDefault(); } int index = System.identityHashCode(zone) & (FAST_CACHE_SIZE - 1); ISOChronology chrono = cFastCache[index]; if (chrono != null && chrono.getZone() == zone) { return chrono; } synchronized (cCache) { chrono = cCache.get(zone); if (chrono == null) { chrono = new ISOChronology(ZonedChronology.getInstance(INSTANCE_UTC, zone)); cCache.put(zone, chrono); } } cFastCache[index] = chrono; return chrono; }