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

io.sphere.sdk.models.SphereEnumerationUtils Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.models;

import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;

import static java.util.stream.Collectors.joining;

final class SphereEnumerationUtils {
    private SphereEnumerationUtils() {
    }

    static String toSphereName(final String uppercaseName) {
        return Arrays.stream(StringUtils.split(uppercaseName, '_'))
                .map(s -> s.toLowerCase())
                .map(StringUtils::capitalize)
                .collect(joining(""));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy