Skip to content

Commit

Permalink
Changed Bundlinbg by Multiple Fields examples to Java 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
r4m-juan committed Jun 21, 2022
1 parent 5748b0c commit 8799acb
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.route4me</groupId>
<artifactId>route4me-java-sdk</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
*
Expand Down Expand Up @@ -70,67 +71,107 @@ public static void main(String[] args) {
Address address;

address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE001"},
{"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);

address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "FLOOR001"},
{"LOCATION_ID", "Doe"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE002"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE002"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR004"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE002"},
{"LOCATION_ID", "FLOOR004"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR004"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE002"},
{"LOCATION_ID", "FLOOR004"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);

address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR002"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR002"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR003"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR003"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE003"},
{"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);

address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE004"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR001"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE004"},
{"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR002"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE004"},
{"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);
address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR002"));
address.setCustom_fields(Stream.of(new String[][]{
{"BUNDLING_KEY", "ZONE004"},
{"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1])));
addresses.add(address);

optParameters.setAddresses(addresses);
Expand Down

0 comments on commit 8799acb

Please sign in to comment.