Examples of plus()


Examples of org.joda.time.DateTime.plus()

      duration = Duration.standardHours(1);
    }
   
    // check interval at next half hour
    DateTime firstTimeslot = getNextHalfHour();
    Interval test = new Interval(firstTimeslot, firstTimeslot.plus(duration));
    testInterval(infeasible, preferred, test, solutions);
   
    // loop over all infeasible intervals
    for (Interval i : infeasible) {
      // test timeslot left from the infeasible interval

Examples of org.joda.time.Duration.plus()

          workingHours = workingHours.withEnd(now);
        } else if (workingHours.getEnd().isBefore(now)) {
          // leave end of working hours as is
        }
      }
      duration = duration.plus(workingHours.toDuration());
      dateBeingProcessed = dateBeingProcessed.plusDays(1);
      processingInterval = getEntireDayIntervalForDate(dateBeingProcessed);
    }
    System.out.println(duration.toPeriod());
    return duration;

Examples of org.jscience.mathematics.number.Complex.plus()

        startTime();
        for (int i = 0; i < 10000; i++) {
            StackContext.enter();
            Complex x = Complex.valueOf(1.0, 2.0);
            for (int j = 0; j < results.length; j++) {
                results[j] = x.plus(x);
            }
            StackContext.exit();
        }
        endTime(10000 * results.length);

 

Examples of org.jscience.mathematics.number.Float64.plus()

        startTime();
        for (int i = 0; i < 10000; i++) {
            StackContext.enter();
            Float64 x = Float64.ONE;
            for (int j = 0; j < results.length; j++) {
                results[j] = x.plus(x);
            }
            StackContext.exit();
        }
        endTime(10000 * results.length);

 

Examples of org.jscience.mathematics.number.LargeInteger.plus()

        System.out.print("LargeInteger (1024 bits) addition: ");
        startTime();
        for (int i = 0; i < 1000; i++) {
            StackContext.enter();
            for (int j = 0; j < results.length; j++) {
                results[j] = large.plus(large);
            }
            StackContext.exit();
        }
        endTime(1000 * results.length);

 

Examples of org.libreplan.business.planner.entities.ShareDivision.plus()

    }

    private EffortDuration[] distribute(EffortDuration effort,
            List<Share> shares) {
        ShareDivision division = ShareDivision.create(shares);
        return fromSecondsToDurations(division.to(division.plus(effort
                .getSeconds())));
    }

    private List<EffortDuration> asList(EffortDuration[] acc) {
        return new ArrayList<EffortDuration>(Arrays.asList(acc));

Examples of org.libreplan.business.workingday.EffortDuration.plus()

    private void addToResult(SortedMap<LocalDate, EffortDuration> result,
            LocalDate date, EffortDuration duration) {
        EffortDuration current = result.get(date) != null ? result.get(date)
                : zero();
        result.put(date, current.plus(duration));
    }

    public List<DayAssignment> getDayAssignments(DayAssignment.FilterType filter) {
        List<DayAssignment> dayAssignments = new ArrayList<DayAssignment>();
        Set<ResourceAllocation<?>> resourceAllocations = getSatisfiedResourceAllocations();

Examples of org.mifosplatform.organisation.monetary.domain.Money.plus()

            numberOfDaysOfBalance = spanOfBalance.daysInPeriodInclusiveOfEndDate();
        } else {
            if (isDeposit()) {
                // endOfDayBalance = openingBalance.plus(getAmount(currency));
                // if (endOfDayBalance.isLessThanZero()) {
                endOfDayBalance = endOfDayBalance.plus(getAmount(currency));
                // }
            } else if (isWithdrawal() || isChargeTransactionAndNotReversed()) {
                // endOfDayBalance = openingBalance.minus(getAmount(currency));
                if (endOfDayBalance.isGreaterThanZero()) {
                    endOfDayBalance = endOfDayBalance.minus(getAmount(currency));

Examples of org.modeshape.jcr.api.value.DateTime.plus()

                ++i;
                if (stat == null) continue;
                sb.append("\n  ");
                sb.append(stat);
                sb.append("  at  ");
                sb.append(startTime.plus(i * width, TimeUnit.SECONDS));
            }
            return sb.toString();
        }
    }
}

Examples of org.threeten.bp.Instant.plus()

      assertEquals(now.plus(1, MINUTES).plus(60, SECONDS), exchanges.get(3).getVersionToInstant());
      //
      assertEquals(now.plus(1, MINUTES).plus(60, SECONDS), exchanges.get(2).getVersionFromInstant());
      assertEquals(now.plus(1, MINUTES).plus(120, SECONDS), exchanges.get(2).getVersionToInstant());
      //
      assertEquals(now.plus(1, MINUTES).plus(120, SECONDS), exchanges.get(1).getVersionFromInstant());
      assertEquals(now.plus(1, MINUTES).plus(180, SECONDS), exchanges.get(1).getVersionToInstant());
      //
      assertEquals(now.plus(1, MINUTES).plus(180, SECONDS), exchanges.get(0).getVersionFromInstant());
      assertEquals(null, exchanges.get(0).getVersionToInstant());
    } finally {
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.