org.babyfish.jimmer.client.generator.Namespace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-client Show documentation
Show all versions of jimmer-client Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.client.generator;
import java.util.HashMap;
import java.util.Map;
public class Namespace {
private final Map map = new HashMap<>();
private final Map subMap = new HashMap<>();
public String allocate(String name) {
int value = map.getOrDefault(name, 1);
map.put(name, value + 1);
return value == 1 ? name : name + '_' + value;
}
public Namespace subNamespace(String name) {
return subMap.computeIfAbsent(name, it -> new Namespace());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy