@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof RoadModelBuilders.CollisionPlaneRMB) { RoadModelBuilders.CollisionPlaneRMB that = (RoadModelBuilders.CollisionPlaneRMB) o; return (this.distanceUnit.equals(that.getDistanceUnit())) && (this.speedUnit.equals(that.getSpeedUnit())) && (this.min.equals(that.getMin())) && (this.max.equals(that.getMax())) && (Double.doubleToLongBits(this.maxSpeed) == Double.doubleToLongBits(that.getMaxSpeed())) && (Double.doubleToLongBits(this.objectRadius) == Double.doubleToLongBits(that.getObjectRadius())); } return false; }
/** * Each {@link MovingRoadUser} in the {@link CollisionPlaneRoadModel} has a * fixed radius that can be set with this method. * @param radius The radius for each {@link MovingRoadUser}. * @return A new builder instance. */ public CollisionPlaneRMB withObjectRadius(double radius) { checkArgument(radius > 0); return create(getDistanceUnit(), getSpeedUnit(), getMin(), getMax(), getMaxSpeed(), radius); }
@Override public CollisionPlaneRMB withMaxSpeed(double maxSpeed) { checkMaxSpeed(maxSpeed); return create(getDistanceUnit(), getSpeedUnit(), getMin(), getMax(), maxSpeed, getObjectRadius()); }
@Override public CollisionPlaneRMB withSpeedUnit(Unit<Velocity> unit) { return create(getDistanceUnit(), unit, getMin(), getMax(), getMaxSpeed(), getObjectRadius()); }
@Override public CollisionPlaneRMB withMinPoint(Point minPoint) { return create(getDistanceUnit(), getSpeedUnit(), minPoint, getMax(), getMaxSpeed(), getObjectRadius()); }
@Override public CollisionPlaneRMB withDistanceUnit(Unit<Length> unit) { return create(unit, getSpeedUnit(), getMin(), getMax(), getMaxSpeed(), getObjectRadius()); }