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.8.0
Show newest version
package io.ebeaninternal.api;

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

public final class NaturalKeySet {

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

  NaturalKeySet() {
  }

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

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

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

  Object inValue(Object naturalKey) {
    return map.get(naturalKey).inValue();
  }
}