* @param chrono the chronology to use, null means let converter decide
* @throws IllegalArgumentException if the interval is invalid
*/
protected BaseInterval(Object interval, Chronology chrono) {
super();
IntervalConverter converter = ConverterManager.getInstance().getIntervalConverter(interval);
if (converter.isReadableInterval(interval, chrono)) {
ReadableInterval input = (ReadableInterval) interval;
iChronology = (chrono != null ? chrono : input.getChronology());
iStartMillis = input.getStartMillis();
iEndMillis = input.getEndMillis();
} else if (this instanceof ReadWritableInterval) {
converter.setInto((ReadWritableInterval) this, interval, chrono);
} else {
MutableInterval mi = new MutableInterval();
converter.setInto(mi, interval, chrono);
iChronology = mi.getChronology();
iStartMillis = mi.getStartMillis();
iEndMillis = mi.getEndMillis();
}
checkInterval(iStartMillis, iEndMillis);