com.geotab.model.Dictionary Maven / Gradle / Ivy
package com.geotab.model;
import java.util.ArrayList;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.Setter;
public class Dictionary extends ArrayList> {
public Map asMap() {
return stream().collect(Collectors.toMap(e -> e.k, e -> e.v));
}
@Getter @Setter
@SuppressWarnings("CheckStyle")
public static class Entry {
protected K k;
protected V v;
}
}