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

io.sphere.sdk.search.tokenizer.CustomSuggestTokenizer Maven / Gradle / Ivy

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

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

import java.util.Collections;
import java.util.List;

public class CustomSuggestTokenizer extends Base implements SuggestTokenizer {
    private final List inputs;

    @JsonCreator
    private CustomSuggestTokenizer(final List inputs) {
        this.inputs = inputs;
    }

    public List getInputs() {
        return inputs;
    }

    @JsonIgnore
    public static CustomSuggestTokenizer of(final String input) {
        return of(Collections.singletonList(input));
    }

    @JsonIgnore
    public static CustomSuggestTokenizer of(final List inputs) {
        return new CustomSuggestTokenizer(inputs);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy