- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
/** * Setup an environment with three vehicles and three parcels. */ @Before public void setUp() { final DependencyProvider dp = mock(DependencyProvider.class); rm = PDPRoadModel.builder( RoadModelBuilders.plane() .withMaxSpeed(300d)) .withAllowVehicleDiversion(false) .build(dp); when(dp.get(RoadModel.class)).thenReturn(rm); pm = DefaultPDPModel.builder() .withTimeWindowPolicy(TimeWindowPolicies.TARDY_ALLOWED) .build(dp); mp = new TestModelProvider(new ArrayList<>( Arrays.<Model<?>>asList(rm, pm))); rm.registerModelProvider(mp); v1 = new TestVehicle(new Point(0, 1)); v2 = new TestVehicle(new Point(0, 2)); v3 = new TestVehicle(new Point(0, 3)); p1 = createParcel(new Point(3, 0), new Point(0, 3)); p2 = createParcel(new Point(6, 9), new Point(2, 9)); p3 = createParcel(new Point(2, 8), new Point(8, 2)); ss = rm.getSnapshot(); }
.withSpeedUnit(NonSI.KILOMETERS_PER_HOUR)) .withAllowVehicleDiversion(allowDiversion) .build(dep);
.withMaxSpeed(30d)) .withAllowVehicleDiversion(diversionIsAllowed) .build(dp);