All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.mruoc.nac.entities.Locations Maven / Gradle / Ivy

There is a newer version: 0.1.45
Show newest version
package uk.co.mruoc.nac.entities;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Locations {

  public static Map toMap(Collection locations) {
    return locations.stream()
        .collect(
            Collectors.toMap(
                Location::getKey, Function.identity(), (x, y) -> y, LinkedHashMap::new));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy