|
36 | 36 | import java.util.ArrayList;
|
37 | 37 | import java.util.Arrays;
|
38 | 38 | import java.util.List;
|
39 |
| -import java.util.Map; |
| 39 | +import java.util.stream.Collectors; |
| 40 | +import java.util.stream.Stream; |
40 | 41 |
|
41 | 42 | /**
|
42 | 43 | *
|
@@ -70,67 +71,107 @@ public static void main(String[] args) {
|
70 | 71 | Address address;
|
71 | 72 |
|
72 | 73 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
73 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001")); |
| 74 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 75 | + {"BUNDLING_KEY", "ZONE001"}, |
| 76 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
74 | 77 | addresses.add(address);
|
75 | 78 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
76 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001")); |
| 79 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 80 | + {"BUNDLING_KEY", "ZONE001"}, |
| 81 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
77 | 82 | addresses.add(address);
|
78 | 83 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
79 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR001")); |
| 84 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 85 | + {"BUNDLING_KEY", "ZONE001"}, |
| 86 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
80 | 87 | addresses.add(address);
|
81 | 88 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
82 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003")); |
| 89 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 90 | + {"BUNDLING_KEY", "ZONE001"}, |
| 91 | + {"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
83 | 92 | addresses.add(address);
|
84 | 93 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
85 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003")); |
| 94 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 95 | + {"BUNDLING_KEY", "ZONE001"}, |
| 96 | + {"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
86 | 97 | addresses.add(address);
|
87 | 98 | address = new Address("4738 BELLEVUE AVE, Louisville, KY, 40215", 38.179806, -85.775558, 300);
|
88 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE001", "LOCATION_ID", "FLOOR003")); |
| 99 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 100 | + {"BUNDLING_KEY", "ZONE001"}, |
| 101 | + {"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
89 | 102 | addresses.add(address);
|
90 |
| - |
| 103 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 104 | + {"BUNDLING_KEY", "FLOOR001"}, |
| 105 | + {"LOCATION_ID", "Doe"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
91 | 106 | address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
|
92 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR001")); |
| 107 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 108 | + {"BUNDLING_KEY", "ZONE002"}, |
| 109 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
93 | 110 | addresses.add(address);
|
94 | 111 | address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
|
95 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR001")); |
| 112 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 113 | + {"BUNDLING_KEY", "ZONE002"}, |
| 114 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
96 | 115 | addresses.add(address);
|
97 | 116 | address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
|
98 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR004")); |
| 117 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 118 | + {"BUNDLING_KEY", "ZONE002"}, |
| 119 | + {"LOCATION_ID", "FLOOR004"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
99 | 120 | addresses.add(address);
|
100 | 121 | address = new Address("318 SO. 39TH STREET, Louisville, KY, 40212", 38.259335, -85.815094, 300);
|
101 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE002", "LOCATION_ID", "FLOOR004")); |
| 122 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 123 | + {"BUNDLING_KEY", "ZONE002"}, |
| 124 | + {"LOCATION_ID", "FLOOR004"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
102 | 125 | addresses.add(address);
|
103 |
| - |
104 | 126 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
105 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR001")); |
| 127 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 128 | + {"BUNDLING_KEY", "ZONE003"}, |
| 129 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
106 | 130 | addresses.add(address);
|
107 | 131 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
108 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR001")); |
| 132 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 133 | + {"BUNDLING_KEY", "ZONE003"}, |
| 134 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
109 | 135 | addresses.add(address);
|
110 | 136 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
111 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR002")); |
| 137 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 138 | + {"BUNDLING_KEY", "ZONE003"}, |
| 139 | + {"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
112 | 140 | addresses.add(address);
|
113 | 141 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
114 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR002")); |
| 142 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 143 | + {"BUNDLING_KEY", "ZONE003"}, |
| 144 | + {"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
115 | 145 | addresses.add(address);
|
116 | 146 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
117 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR003")); |
| 147 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 148 | + {"BUNDLING_KEY", "ZONE003"}, |
| 149 | + {"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
118 | 150 | addresses.add(address);
|
119 | 151 | address = new Address("1324 BLUEGRASS AVE, Louisville, KY, 40215", 38.179253, -85.785118, 300);
|
120 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE003", "LOCATION_ID", "FLOOR003")); |
| 152 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 153 | + {"BUNDLING_KEY", "ZONE003"}, |
| 154 | + {"LOCATION_ID", "FLOOR003"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
121 | 155 | addresses.add(address);
|
122 |
| - |
123 | 156 | address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
|
124 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR001")); |
| 157 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 158 | + {"BUNDLING_KEY", "ZONE004"}, |
| 159 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
125 | 160 | addresses.add(address);
|
126 | 161 | address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
|
127 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR001")); |
| 162 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 163 | + {"BUNDLING_KEY", "ZONE004"}, |
| 164 | + {"LOCATION_ID", "FLOOR001"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
128 | 165 | addresses.add(address);
|
129 | 166 | address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
|
130 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR002")); |
| 167 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 168 | + {"BUNDLING_KEY", "ZONE004"}, |
| 169 | + {"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
131 | 170 | addresses.add(address);
|
132 | 171 | address = new Address("4805 BELLEVUE AVE, Louisville, KY, 40215", 38.162472, -85.792854, 300);
|
133 |
| - address.setCustom_fields(Map.of("BUNDLING_KEY", "ZONE004", "LOCATION_ID", "FLOOR002")); |
| 172 | + address.setCustom_fields(Stream.of(new String[][]{ |
| 173 | + {"BUNDLING_KEY", "ZONE004"}, |
| 174 | + {"LOCATION_ID", "FLOOR002"},}).collect(Collectors.toMap(data -> data[0], data -> data[1]))); |
134 | 175 | addresses.add(address);
|
135 | 176 |
|
136 | 177 | optParameters.setAddresses(addresses);
|
|
0 commit comments