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

io.sphere.sdk.products.attributes.EnumType 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.EnumValue;

import java.util.List;

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

public class EnumType extends AttributeTypeBase {
    private final List values;

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

    public List getValues() {
        return values;
    }

    @JsonIgnore
    public static EnumType of(final EnumValue mandatoryValue, final EnumValue... moreValues) {
        return of(listOf(mandatoryValue, moreValues));
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy