<p>Moves this interval along the time axis by given units. </p>

@param   amount  amount of units
@param   unit    time unit for moving
@return  moved copy of this interval
554342
public TimestampInterval move(
        long amount,
        IsoUnit unit
    ) {

        if (amount == 0) {
            return this;
        }

        Boundary<PlainTimestamp> s;
        Boundary<PlainTimestamp> e;

        if (this.getStart().isInfinite()) {
            s = Boundary.infinitePast();
        } else {
            s =
                Boundary.of(
                    this.getStart().getEdge(),
                    this.getStart().getTemporal().plus(amount, unit));
        }

        if (this.getEnd().isInfinite()) {
            e = Boundary.infiniteFuture();
        } else {
            e =
                Boundary.of(
                    this.getEnd().getEdge(),
                    this.getEnd().getTemporal().plus(amount, unit));
        }

        return new TimestampInterval(s, e);

    }
580830
@Override
    public ChronoPeriod plus(TemporalAmount amountToAdd) {
        ChronoPeriodImpl amount = validateAmount(amountToAdd);
        return new ChronoPeriodImpl(
                chrono,
                Math.addExact(years, amount.years),
                Math.addExact(months, amount.months),
                Math.addExact(days, amount.days));
    }
383134
public static Date addDay(Date date, int amount) {
        return add(date, Calendar.DATE, amount);
    }
740416
public MomentInterval move(
        long amount,
        TimeUnit unit
    ) {

        if (amount == 0) {
            return this;
        }

        Boundary<Moment> s;
        Boundary<Moment> e;

        if (this.getStart().isInfinite()) {
            s = Boundary.infinitePast();
        } else {
            s =
                Boundary.of(
                    this.getStart().getEdge(),
                    this.getStart().getTemporal().plus(amount, unit));
        }

        if (this.getEnd().isInfinite()) {
            e = Boundary.infiniteFuture();
        } else {
            e =
                Boundary.of(
                    this.getEnd().getEdge(),
                    this.getEnd().getTemporal().plus(amount, unit));
        }

        return new MomentInterval(s, e);

    }
1199995
static public TimePeriod from(String quantityAndUnit) {
		String trimed = quantityAndUnit.trim();
		String allExceptLast = trimed.substring(0, trimed.length() - 1);
		if (StringUtils.isNumericSpace(allExceptLast)){ // short format
			long quantity = Long.parseLong(allExceptLast.trim());
			TimePeriodUnit unit = TimePeriodUnit.from(Character.toUpperCase(trimed.charAt(trimed.length() - 1)));
			return new TimePeriod(quantity, unit);
		}else{
			String[] durationAndUnit = StringUtils.split(trimed);
			Long duration = Long.valueOf(durationAndUnit[0]);
			TimePeriodUnit unit = TimePeriodUnit.from(durationAndUnit[1]);
			return new TimePeriod(duration, unit);
		}
	}
625783
public static Date addSecond(String date, int amount) throws ParseException {
        return add(date, Calendar.SECOND, amount);
    }
648472
public void setExchangeRate(Currency otherCurrency, double amount) {
        Common.getInstance().getStorageHandler().getStorageEngine().setExchangeRate(this, otherCurrency, amount);
    }
347079
function(amount) {
      for (var sI = 0; sI < this.slices.length; sI++)
        this.slices[sI].start = (this.slices[sI].start + amount);
      for (var id in this.counters)
        this.counters[id].shiftTimestampsForward(amount);
    }
838950
public DateInterval move(
        long amount,
        IsoDateUnit unit
    ) {

        if (amount == 0) {
            return this;
        }

        Boundary<PlainDate> s;
        Boundary<PlainDate> e;

        if (this.getStart().isInfinite()) {
            s = Boundary.infinitePast();
        } else {
            s =
                Boundary.of(
                    this.getStart().getEdge(),
                    this.getStart().getTemporal().plus(amount, unit));
        }

        if (this.getEnd().isInfinite()) {
            e = Boundary.infiniteFuture();
        } else {
            e =
                Boundary.of(
                    this.getEnd().getEdge(),
                    this.getEnd().getTemporal().plus(amount, unit));
        }

        return new DateInterval(s, e);

    }
622935
public Calendar moveCurrentDate(final BaseCalculator<Calendar> calculator) {
        return adjustDate(calculator.getCurrentBusinessDate(), calculator.getCurrentIncrement(), calculator);
    }
237565
public void tick(long duration, TimeUnit unit) {
        this.date = new Date(date.getTime() + unit.toMillis(duration));
    }
1011343
public long add(long instant, int amount) {
        instant = super.add(instant, amount);
        FieldUtils.verifyValueBounds(this, get(instant), iMin, iMax);
        return instant;
    }
461688
public ItemStack extract(int amount)
	{
		ItemStackSplitter iss = new ItemUtils.ItemStackSplitter(getItemStack());
		iss.split(amount);
		setItemStack(iss.source);
		//if (hasChanged())
		onSlotChanged();
		return iss.split;
	}
371166
public static Date add(Date date, int field, int amount) {
        CALENDAR.setTime(date);
        CALENDAR.add(field, amount);
        return CALENDAR.getTime();
    }
161071
public static <D extends Comparable> DateTimeExpression<D> dateadd(DatePart unit, DateTimeExpression<D> date, int amount) {
        return Expressions.dateTimeOperation(date.getType(), DATE_ADD_OPS.get(unit), date, ConstantImpl.create(amount));
    }
676038
public D minus(int amount) {

        if (amount == 0) {
            return this.self();
        }

        long value = this.amount;
        return this.with(MathUtils.safeCast(value - amount));

    }
741267
public static IntStream numberRangeWithCount(int start, int interval,
            int count) {
        return IntStream.iterate(start, n -> n + interval).limit(count);
    }