/** * Sets the value of one of the fields. * <p> * The field type specified must be one of those that is supported by the period. * * @param field a DurationFieldType instance that is supported by this period, not null * @param value the new value for the field * @throws IllegalArgumentException if the field is null or not supported */ public void set(DurationFieldType field, int value) { super.setField(field, value); }
/** * Sets the value of one of the fields. * <p> * The field type specified must be one of those that is supported by the period. * * @param field a DurationFieldType instance that is supported by this period, not null * @param value the new value for the field * @throws IllegalArgumentException if the field is null or not supported */ public void set(DurationFieldType field, int value) { super.setField(field, value); }
/** * Sets the number of hours of the period. * * @param hours the number of hours * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setHours(int hours) { super.setField(DurationFieldType.hours(), hours); }
/** * Sets the number of months of the period. * * @param months the number of months * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMonths(int months) { super.setField(DurationFieldType.months(), months); }
/** * Sets the number of weeks of the period. * * @param weeks the number of weeks * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setWeeks(int weeks) { super.setField(DurationFieldType.weeks(), weeks); }
/** * Sets the number of millis of the period. * * @param millis the number of millis * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMillis(int millis) { super.setField(DurationFieldType.millis(), millis); }
/** * Sets the number of days of the period. * * @param days the number of days * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setDays(int days) { super.setField(DurationFieldType.days(), days); }
/** * Sets the number of years of the period. * * @param years the number of years * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setYears(int years) { super.setField(DurationFieldType.years(), years); }
/** * Sets the number of seconds of the period. * * @param seconds the number of seconds * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setSeconds(int seconds) { super.setField(DurationFieldType.seconds(), seconds); }
/** * Sets the number of minutes of the period. * * @param minutes the number of minutes * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMinutes(int minutes) { super.setField(DurationFieldType.minutes(), minutes); }
/** * Sets the number of years of the period. * * @param years the number of years * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setYears(int years) { super.setField(DurationFieldType.years(), years); }
/** * Sets the number of weeks of the period. * * @param weeks the number of weeks * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setWeeks(int weeks) { super.setField(DurationFieldType.weeks(), weeks); }
/** * Sets the number of seconds of the period. * * @param seconds the number of seconds * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setSeconds(int seconds) { super.setField(DurationFieldType.seconds(), seconds); }
/** * Sets the number of millis of the period. * * @param millis the number of millis * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMillis(int millis) { super.setField(DurationFieldType.millis(), millis); }
/** * Sets the number of months of the period. * * @param months the number of months * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMonths(int months) { super.setField(DurationFieldType.months(), months); }
/** * Sets the number of minutes of the period. * * @param minutes the number of minutes * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMinutes(int minutes) { super.setField(DurationFieldType.minutes(), minutes); }
/** * Sets the number of days of the period. * * @param days the number of days * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setDays(int days) { super.setField(DurationFieldType.days(), days); }
/** * Sets the number of hours of the period. * * @param hours the number of hours * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setHours(int hours) { super.setField(DurationFieldType.hours(), hours); }
/** * Sets the number of years of the period. * * @param years the number of years * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setYears(int years) { super.setField(DurationFieldType.years(), years); }
/** * Sets the number of minutes of the period. * * @param minutes the number of minutes * @throws IllegalArgumentException if field is not supported and the value is non-zero */ public void setMinutes(int minutes) { super.setField(DurationFieldType.minutes(), minutes); }