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

io.ebeaninternal.api.NaturalKeySet Maven / Gradle / Ivy

There is a newer version: 15.6.0
Show newest version
package io.ebeaninternal.api;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

public class NaturalKeySet {


  private final Map map = new LinkedHashMap<>();

  public NaturalKeySet() {
  }

  public int size() {
    return map.size();
  }

  public void add(NaturalKeyEntry entry) {
    map.put(entry.key(), entry);
  }

  public Set keys() {
    return map.keySet();
  }

  public Object getInValue(Object naturalKey) {
    NaturalKeyEntry entry = map.get(naturalKey);
    return entry.getInValue();
  }
}