Lines Matching defs:amount

852      * Adds the specified (signed) amount of time to the given calendar field,
857 * call is <code>amount</code>, modulo any overflow that has occurred in
873 * @param amount the amount of date or time to be added to the field.
879 public void add(int field, int amount) {
880 // If amount == 0, do nothing even the given field is out of
882 if (amount == 0) {
896 year += amount;
906 year -= amount;
917 int month = internalGet(MONTH) + amount;
961 int era = internalGet(ERA) + amount;
970 long delta = amount;
974 // amount to milliseconds and call setTimeInMillis.
993 // given amount to the number of days.
1006 // Convert the amount to the number of days (delta)
1008 delta = amount / 2;
1009 timeOfDay = 12 * (amount % 2);
1082 * Adds a signed amount to the specified calendar field without changing larger fields.
1083 * A negative roll amount means to subtract from field without changing
1084 * larger fields. If the specified amount is 0, this method performs nothing.
1087 * amount so that all the calendar fields are normalized. If there
1115 * @param amount the signed amount to add to <code>field</code>.
1125 public void roll(int field, int amount) {
1126 // If amount == 0, do nothing even the given field is out of
1128 if (amount == 0) {
1160 int nh = (h + amount) % unit;
1205 int mon = (internalGet(MONTH) + amount) % 12;
1222 int mon = (internalGet(MONTH) + amount) % yearLength;
1241 int value = woy + amount;
1288 value = getRolledValue(woy, amount, min, max) - 1;
1326 int value = getRolledValue(internalGet(field), amount, 1, max) - 1;
1364 int value = getRolledValue((int)(fd - month1), amount, 0, actualMonthLength() - 1);
1381 int value = getRolledValue((int)(fd - jan1) + 1, amount, min, max);
1405 amount %= 7;
1406 if (amount == 0) {
1411 fd += amount;
1449 int value = getRolledValue(internalGet(field), amount, min, max) - 1;
1459 set(field, getRolledValue(internalGet(field), amount, min, max));
3143 * Returns the new value after 'roll'ing the specified value and amount.
3145 private static final int getRolledValue(int value, int amount, int min, int max) {
3148 amount %= range;
3149 int n = value + amount;