Esempio n. 1
0
 /**
  * Sets this field in a copy of the TimeOfDay to a parsed text value.
  *
  * <p>The TimeOfDay attached to this property is unchanged by this call. Instead, a new instance
  * is returned.
  *
  * @param text the text value to set
  * @param locale optional locale to use for selecting a text symbol
  * @return a copy of the TimeOfDay with the field value changed
  * @throws IllegalArgumentException if the text value isn't valid
  */
 public TimeOfDay setCopy(String text, Locale locale) {
   int[] newValues = iTimeOfDay.getValues();
   newValues = getField().set(iTimeOfDay, iFieldIndex, newValues, text, locale);
   return new TimeOfDay(iTimeOfDay, newValues);
 }
Esempio n. 2
0
 /**
  * Sets this field in a copy of the TimeOfDay.
  *
  * <p>The TimeOfDay attached to this property is unchanged by this call. Instead, a new instance
  * is returned.
  *
  * @param value the value to set the field in the copy to
  * @return a copy of the TimeOfDay with the field value changed
  * @throws IllegalArgumentException if the value isn't valid
  */
 public TimeOfDay setCopy(int value) {
   int[] newValues = iTimeOfDay.getValues();
   newValues = getField().set(iTimeOfDay, iFieldIndex, newValues, value);
   return new TimeOfDay(iTimeOfDay, newValues);
 }
Esempio n. 3
0
 /**
  * Gets the value of this field.
  *
  * @return the field value
  */
 public int get() {
   return iTimeOfDay.getValue(iFieldIndex);
 }
Esempio n. 4
0
 /**
  * Adds to the value of this field in a copy of this TimeOfDay wrapping within this field if the
  * maximum value is reached.
  *
  * <p>The value will be added to this field. If the value is too large to be added solely to
  * this field then it wraps within this field. Other fields are unaffected.
  *
  * <p>For example, <code>12:59:37</code> addWrapField one minute returns <code>12:00:37</code>.
  *
  * <p>The TimeOfDay attached to this property is unchanged by this call. Instead, a new instance
  * is returned.
  *
  * @param valueToAdd the value to add to the field in the copy
  * @return a copy of the TimeOfDay with the field value changed
  * @throws IllegalArgumentException if the value isn't valid
  */
 public TimeOfDay addWrapFieldToCopy(int valueToAdd) {
   int[] newValues = iTimeOfDay.getValues();
   newValues = getField().addWrapField(iTimeOfDay, iFieldIndex, newValues, valueToAdd);
   return new TimeOfDay(iTimeOfDay, newValues);
 }
Esempio n. 5
0
 /**
  * Gets the field that this property uses.
  *
  * @return the field
  */
 public DateTimeField getField() {
   return iTimeOfDay.getField(iFieldIndex);
 }