result.setMonth((short) number); hasNumber = false; } else {
result.setMonth((short)number); hasNumber = false;
/** * Fill in the fields of the TimeDuration with the given values * @param year the year value * @param month the month value * @param day the day value * @param hour the hour value * @param minute the minute value * @param second the second value */ public void setValue(short year, short month, short day, short hour, short minute, short second, short millisecond) { this.setYear(year); this.setMonth(month); this.setDay(day); this.setHour(hour); this.setMinute(minute); this.setSeconds(second); this.setMilli(millisecond); }
/** * Fill in the fields of the TimeDuration with the given values * * @param year the year value * @param month the month value * @param day the day value * @param hour the hour value * @param minute the minute value * @param second the second value */ public void setValue(short year, short month, short day, short hour, short minute, short second, short millisecond) { this.setYear(year); this.setMonth(month); this.setDay(day); this.setHour(hour); this.setMinute(minute); this.setSeconds(second); this.setMilli(millisecond); }
/** * Sets the value of the field associated with this descriptor. * * @param target the object in which to set the value * @param value the value of the field */ public void setValue(Object target, Object value) throws java.lang.IllegalStateException { if (!(target instanceof TimeDuration)) { // -- throw exception } TimeDuration time = (TimeDuration) target; if (value == null) { /// do something } // -- update current instance of time with new time try { TimeDuration temp = TimeDuration.parseTimeDuration(value.toString()); time.setYear(temp.getYear()); time.setMonth(temp.getMonth()); time.setDay(temp.getDay()); time.setHour(temp.getHour()); time.setMinute(temp.getMinute()); time.setSeconds(temp.getSeconds()); } catch (java.text.ParseException ex) { // -- ignore for now } } // -- setValue
/** * Sets the value of the field associated with this descriptor. * * @param target * the object in which to set the value * @param value * the value of the field */ public void setValue(Object target, Object value) throws java.lang.IllegalStateException { if (! (target instanceof TimeDuration) ) { //-- throw exception } TimeDuration time = (TimeDuration) target; if (value == null) { /// do something } //-- update current instance of time with new time try { TimeDuration temp = TimeDuration.parseTimeDuration(value.toString()) ; time.setYear(temp.getYear()); time.setMonth(temp.getMonth()); time.setDay(temp.getDay()); time.setHour(temp.getHour()); time.setMinute(temp.getMinute()); time.setSeconds(temp.getSeconds()); } catch (java.text.ParseException ex) { //-- ignore for now } } //-- setValue