/** * Creates a new instance of the object described by this field. * * @param parent The object for which the field is created * @return A new instance of the field's value * @throws IllegalStateException This field is a simple type and cannot be instantiated */ public Object newInstance(Object parent) throws IllegalStateException { return new RecurringDuration(); } // -- newInstance
/** * Creates a new instance of the object described by this field. * * @param parent * The object for which the field is created * @return A new instance of the field's value * @throws IllegalStateException * This field is a simple type and cannot be instantiated */ public Object newInstance(Object parent) throws IllegalStateException { return new RecurringDuration(); } //-- newInstance
/** * returns a recurringDurationBase with the facets duration and period set up but also the fields * * @param duration the String representing the duration facet * @param period the String reprensenting the period facet * @param values an array of shorts which contains the values of the fields * @throws IllegalArgumentException this exception is thrown when the values array is not of * length 6. * @see #setValues */ protected RecurringDurationBase(String duration, String period, short[] values) throws OperationNotSupportedException { new RecurringDuration(duration, period); if (values.length != 6) { throw new IllegalArgumentException("Wrong numbers of values"); } this.setValues(values); }
/** * returns a recurringDurationBase with the facets duration and period set * up but also the fields * * @param duration * the String representing the duration facet * @param period * the String reprensenting the period facet * @param values * an array of shorts which contains the values of the fields * @throws IllegalArgumentException * this exception is thrown when the values array is not of * length 6. * @see #setValues */ protected RecurringDurationBase(String duration, String period, short[] values) throws OperationNotSupportedException { new RecurringDuration(duration, period); if (values.length != 6) { throw new IllegalArgumentException("Wrong numbers of values"); } this.setValues(values); }
long randLong = _rand.nextLong(); TimeDuration randDuration = new TimeDuration(randLong); RecurringDuration result = new RecurringDuration(randDuration, randDuration); short[] values = new short[10];
RecurringDuration result = new RecurringDuration();
RecurringDuration result = new RecurringDuration();