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

org.babyfish.jimmer.apt.entry.AbstractSummaryGenerator Maven / Gradle / Ivy

There is a newer version: 0.9.17
Show newest version
package org.babyfish.jimmer.apt.entry;

import java.util.HashMap;
import java.util.Map;

public class AbstractSummaryGenerator {

    private Map nameCountMap = new HashMap<>();

    protected String distinctName(String name) {
        int count = nameCountMap.getOrDefault(name, 1);
        nameCountMap.put(name, count + 1);
        if (count == 1) {
            return name;
        }
        return name + '_' + count;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy