Adds the given amount to the field specified by theField

@param theField
The field, uses constants from {@link Calendar} such as {@link Calendar#YEAR}
@param theValue
The number to add (or subtract for a negative number)
971097
public void add(int theField, int theValue) {
		switch (theField) {
		case Calendar.YEAR:
			setValue(DateUtils.addYears(getValue(), theValue), getPrecision());
			break;
		case Calendar.MONTH:
			setValue(DateUtils.addMonths(getValue(), theValue), getPrecision());
			break;
		case Calendar.DATE:
			setValue(DateUtils.addDays(getValue(), theValue), getPrecision());
			break;
		case Calendar.HOUR:
			setValue(DateUtils.addHours(getValue(), theValue), getPrecision());
			break;
		case Calendar.MINUTE:
			setValue(DateUtils.addMinutes(getValue(), theValue), getPrecision());
			break;
		case Calendar.SECOND:
			setValue(DateUtils.addSeconds(getValue(), theValue), getPrecision());
			break;
		case Calendar.MILLISECOND:
			setValue(DateUtils.addMilliseconds(getValue(), theValue), getPrecision());
			break;
		default:
			throw new IllegalArgumentException("Unknown field constant: " + theField);
		}
	}
913801
private static void setFieldValue(Object entity, Field member, Object retVal)
    {
        if (member != null && retVal != null && entity != null)
        {
            PropertyAccessorHelper.set(entity, member, retVal);
        }
    }
111724
public ElementDefinitionDt addType(Type theValue) {
		if (theValue == null) {
			throw new NullPointerException("theValue must not be null");
		}
		getType().add(theValue);
		return this;
	}
544578
public void setField(Object o, String fieldName, Object newValue) {
        if (o == null) {
            throw new IllegalArgumentException("No object to set on provided");
        }
        Field field = findField(o, fieldName);
        if (field == null) {
            throw new IllegalArgumentException(o.getClass() + " does not have a field " + fieldName);
        } else {
            if (!field.isAccessible()) {
                field.setAccessible(true);
            }
            try {
                field.set(o, newValue);
            } catch (IllegalAccessException e) {
                throw new IllegalArgumentException("Unable to set " + newValue + " for " + fieldName, e);
            }
        }
    }
372152
public void addValue (int value)
    {
        if (value < _minValue) {
            _buckets[0]++;
        } else if (value >= _maxValue) {
            _buckets[_buckets.length-1]++;
        } else {
            _buckets[(value-_minValue)/_bucketWidth]++;
        }
        _count++;
    }
945354
private void addYear(int i) {
        Calendar cal = Calendar.getInstance();
        cal.set(getDisplayYear(), 1, 1);
        cal.add(Calendar.YEAR, i);
        yearTextField.setText(String.valueOf(cal.get(Calendar.YEAR)));
    }
686137
private void addMonth(int i) {
        Calendar cal = Calendar.getInstance();
        cal.set(getDisplayYear(), getDisplayMonth() - 1, 1);
        int month = cal.get(Calendar.MONTH) + 1;
        if (i > 0 && month == 12) {
            addYear(1);
        }

        if (i < 0 && month == 1) {
            addYear(-1);
        }
        cal.add(Calendar.MONTH, i);

        monthTextField.setText(String.valueOf(cal.get(Calendar.MONTH) + 1));

    }
325825
public final void setMinValue(final int minValue) {
        Condition.INSTANCE.ensureSmaller(minValue, getMaxValue(),
                "The minimum value must be less than the maximum value");
        this.minValue = minValue;
        setValue(Math.max(getValue(), minValue));
    }
555299
public void put(String strKey, Object objValue)
    {
        if (this.getMessageFieldDesc(strKey) != null)
            this.getMessageFieldDesc(strKey).put(objValue);
        else if (this.getMessage() != null)
            this.getMessage().putNative(this.getFullKey(strKey), objValue);
    }
306071
public boolean add(String inputValue) {
        String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER);
        if (!contains(this.genericValues, value)) {
            addElement(value);
            return true;
        }
        return false;
    }
408718
void add(long value) {
		if (value >= 0) {
			if (count > 0) {
				min =  Math.min(min, value);
				max = Math.max(max, value);
			} else {
				min = value;
				max = value;
			}

			count++;
			sum += value;
		}
	}
1134549
public static Date add(String date, int field, int amount) throws ParseException {
        return add(Formatter.stringToDatetime(date), field, amount);
    }
1024243
public void setValue(Object newValue)
    {
    	if (FieldMetadata.NOT_KNOWN.equals(newValue))
    	{
            setUnknown(false);
            m_notKnown = true;
            return;
    		//throw new RuntimeException("Inconsistent use of NOT_KNOWN");
    	}
    	if (FieldMetadata.UNKNOWN.equals(newValue))
    	{
            setUnknown(true);
            m_notKnown = false;
            return;
    		//throw new RuntimeException("Inconsistent use of UNKNOWN");
    	}
        if (isDerived() && !ValidationUtils.equals(m_currentValue,newValue))
        {
            final String labelName = getPropertyMetadata().getLabelName();
            final String message = m_messageSourceAccessor.getMessage(
                    "nz.co.senanque.validationengine.derivedValue",
                    new Object[]
                    { labelName, newValue }, 
                    "Cannot set derived field.");
            throw new ValidationException(message);
        }
        m_currentValue = newValue;
        useCurrentValue(true);
        setUnknown(false);
        m_notKnown = false;
        
        addHistory(newValue);
    }
881301
public void setValue(int newValue) {
		setValue(newValue, true, true);
		spinner.setValue(new Integer(value));
	}
827779
def addValue(self, _, value):
    """"""
    self.total += self._dataFormat.getValue(value)
691264
public DateTime setField(int field, int value) {
		final Calendar calendar = toCalendar();
		calendar.set(field, value);

		DateTime dt = this;
		if (false == mutable) {
			dt = ObjectUtil.clone(this);
		}
		return dt.setTimeInternal(calendar.getTimeInMillis());
	}
1283046
private void appendValue(Object value) {
        if (value instanceof Boolean) {
            closeTag();
            append(value.toString());
        } else if (value instanceof Number) {
            closeTag();
            append(value.toString());
        } else if (value instanceof String) {
            closeTag();
            escape((String) value);
        } else if (value instanceof MwsObject) {
            ((MwsObject) value).writeFragmentTo(this);
        } else if (value instanceof Node) {
            closeTag();
            append(MwsUtl.toXmlString((Node) value));
        } else if (value instanceof Enum) {
            closeTag();
            append(((Enum<?>) value).toString());
        } else if (value instanceof XMLGregorianCalendar) {
            closeTag();
            append(((XMLGregorianCalendar) value).toXMLFormat());
        } else {
            throw new IllegalArgumentException();
        }
    }