Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static Function<?, ?> addStateToCity(String city, String state) {
- // make sure that the combination of city/state is unique
- // as there may be multiple zipcode records for a city
- CityStates cityInStates = cityStates.get(city);
- if (cityInStates == null) {
- cityStates.put(city, new CityStates(city, state));
- } else {
- if (!cityInStates.statesContainsState(state)) {
- cityInStates.addState(state);
- cityStates.put(city, cityInStates);
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement