Exemplo n.º 1
0
 protected BasePeriod(ReadablePeriod period, Chronology chrono) {
   super();
   iType = checkPeriodType(period.getPeriodType());
   if (this instanceof ReadWritablePeriod) {
     ((ReadWritablePeriod) this).setPeriod(period);
   }
   iValues = period.toMutablePeriod().getValues();
 }
Exemplo n.º 2
0
 protected BasePeriod(ReadablePeriod period, PeriodType type, Chronology chrono) {
   super();
   iType = checkPeriodType(type);
   if (this instanceof ReadWritablePeriod) {
     ((ReadWritablePeriod) this).setPeriod(period);
   } else
     iValues =
         new MutablePeriod(period, type, chrono)
             .getValues(); // -sf- using period.toMutablePeriod() will cause
   // infinite recursion. Thus, use constructor directly
 }