/** * Get this object as a <code>MutablePeriod</code>. * <p> * This will always return a new <code>MutablePeriod</code> with the same fields. * The period will use <code>PeriodType.standard()</code>. * * @return a MutablePeriod using the same field set and values */ public MutablePeriod toMutablePeriod() { MutablePeriod period = new MutablePeriod(); period.add(this); return period; }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration) { add(new Period(duration, getPeriodType())); }
/** * Get this object as a <code>MutablePeriod</code>. * <p> * This will always return a new <code>MutablePeriod</code> with the same fields. * The period will use <code>PeriodType.standard()</code>. * * @return a MutablePeriod using the same field set and values */ public MutablePeriod toMutablePeriod() { MutablePeriod period = new MutablePeriod(); period.add(this); return period; }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @param chrono the chronology to use, null means ISO default * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration, Chronology chrono) { add(new Period(duration, getPeriodType(), chrono)); }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @param chrono the chronology to use, null means ISO default * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration, Chronology chrono) { add(new Period(duration, getPeriodType(), chrono)); }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration) { add(new Period(duration, getPeriodType())); }
/** * Adds a duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * * @param duration the duration to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableDuration duration) { if (duration != null) { add(new Period(duration.getMillis(), getPeriodType())); } }
/** * Adds a duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * * @param duration the duration to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableDuration duration) { if (duration != null) { add(new Period(duration.getMillis(), getPeriodType())); } }
/** * Adds an interval to this one by dividing the interval into * fields and calling {@link #add(ReadablePeriod)}. * * @param interval the interval to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableInterval interval) { if (interval != null) { add(interval.toPeriod(getPeriodType())); } }
/** * Adds an interval to this one by dividing the interval into * fields and calling {@link #add(ReadablePeriod)}. * * @param interval the interval to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableInterval interval) { if (interval != null) { add(interval.toPeriod(getPeriodType())); } }
/** * Get this object as a <code>MutablePeriod</code>. * <p> * This will always return a new <code>MutablePeriod</code> with the same fields. * The period will use <code>PeriodType.standard()</code>. * * @return a MutablePeriod using the same field set and values */ public MutablePeriod toMutablePeriod() { MutablePeriod period = new MutablePeriod(); period.add(this); return period; }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration) { add(new Period(duration, getPeriodType())); }
/** * Adds a millisecond duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * <p> * When dividing the duration, only precise fields in the period type will be used. * For large durations, all the remaining duration will be stored in the largest * available precise field. * * @param duration the duration, in milliseconds * @param chrono the chronology to use, null means ISO default * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(long duration, Chronology chrono) { add(new Period(duration, getPeriodType(), chrono)); }
/** * Adds a duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * * @param duration the duration to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableDuration duration) { if (duration != null) { add(new Period(duration.getMillis(), getPeriodType())); } }
/** * Adds an interval to this one by dividing the interval into * fields and calling {@link #add(ReadablePeriod)}. * * @param interval the interval to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableInterval interval) { if (interval != null) { add(interval.toPeriod(getPeriodType())); } }
/** * Adds a duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * * @param duration the duration to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableDuration duration) { if (duration != null) { add(new Period(duration.getMillis(), getPeriodType())); } }
/** * Adds a duration to this one by dividing the duration into * fields and calling {@link #add(ReadablePeriod)}. * * @param duration the duration to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableDuration duration) { if (duration != null) { add(new Period(duration.getMillis(), getPeriodType())); } }
/** * Adds an interval to this one by dividing the interval into * fields and calling {@link #add(ReadablePeriod)}. * * @param interval the interval to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableInterval interval) { if (interval != null) { add(interval.toPeriod(getPeriodType())); } }
/** * Adds an interval to this one by dividing the interval into * fields and calling {@link #add(ReadablePeriod)}. * * @param interval the interval to add, null means add nothing * @throws ArithmeticException if the addition exceeds the capacity of the period */ public void add(ReadableInterval interval) { if (interval != null) { add(interval.toPeriod(getPeriodType())); } }