Examples of containerContains()


Examples of rinde.sim.core.model.pdp.PDPModel.containerContains()

      curr = Optional.fromNullable(RoadModels.findClosestObject(
          rm.getPosition(this), rm, Parcel.class));
    }

    if (curr.isPresent()) {
      final boolean inCargo = pm.containerContains(this, curr.get());
      // sanity check: if it is not in our cargo AND it is also not on the
      // RoadModel, we cannot go to curr anymore.
      if (!inCargo && !rm.containsObject(curr.get())) {
        curr = Optional.absent();
      } else if (inCargo) {
View Full Code Here

Examples of rinde.sim.core.model.pdp.PDPModel.containerContains()

      final DestType type = containsObject(dp) ? DestType.PICKUP
          : DestType.DELIVERY;
      final Point pos = getParcelPos(destinationRoadUser);
      if (type == DestType.DELIVERY) {
        checkArgument(
            pm.containerContains((DefaultVehicle) object,
                (DefaultParcel) destinationRoadUser),
            "A vehicle can only move to the delivery location of a parcel if it is carrying it.");
      }
      newDestinationObject = new DestinationObject(type, pos, dp);
    } else {
View Full Code Here
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.