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

com.commercetools.sunrise.ctp.CtpEnumUtils Maven / Gradle / Ivy

There is a newer version: 1.0.0-M10
Show newest version
package com.commercetools.sunrise.ctp;

import com.google.common.base.CaseFormat;

public final class CtpEnumUtils {

    private CtpEnumUtils() {
    }

    /**
     * Transforms a CTP enum name (e.g. BALANCE_DUE) to lower CamelCase (e.g. balanceDue).
     * @param ctpEnumName the CTP enum name to transform into lower CamelCase
     * @return the lower CamelCase version of the CTP enum name
     */
    public static String enumToCamelCase(final String ctpEnumName) {
        return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, ctpEnumName);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy