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

io.sphere.sdk.products.attributes.LocalizedEnumType Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.sphere.sdk.models.LocalizedEnumValue;

import java.util.List;

import static io.sphere.sdk.utils.ListUtils.listOf;

public class LocalizedEnumType extends AttributeTypeBase {
    private final List values;

    @JsonCreator
    private LocalizedEnumType(final List values) {
        this.values = values;
    }

    public List getValues() {
        return values;
    }

    @JsonIgnore
    public static LocalizedEnumType of(final LocalizedEnumValue mandatoryValue, final LocalizedEnumValue ... moreValues) {
        final List localizedEnumValues = listOf(mandatoryValue, moreValues);
        return of(localizedEnumValues);
    }

    @JsonIgnore
    public static LocalizedEnumType of(final List values) {
        return new LocalizedEnumType(values);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy