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

slieb.blendercss.utilities.RenamingMap Maven / Gradle / Ivy

Go to download

BlenderCss provides a java toolset that compiles css from different supersets of css together.

The newest version!
package slieb.blendercss.utilities;


import javax.annotation.Nonnull;
import java.util.HashMap;

public class RenamingMap extends HashMap {

    private static final String DELIM = "-";

    @Nonnull
    public String getCssName(@Nonnull String cssClass) {
        if (containsKey(cssClass)) {
            return get(cssClass);
        }

        String d = "";
        final StringBuilder result = new StringBuilder();
        for (String key : cssClass.split(DELIM)) {
            result.append(d).append(containsKey(key) ? get(key) : key);
            d = DELIM;
        }
        return result.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy