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

com.enonic.xp.suggester.SuggestionOption Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.suggester;

public abstract class SuggestionOption
{
    private final String text;

    private final Float score;

    protected SuggestionOption( final Builder builder )
    {
        this.text = builder.text;
        this.score = builder.score;
    }

    public String getText()
    {
        return text;
    }

    public Float getScore()
    {
        return score;
    }

    public abstract static class Builder
    {
        private String text;

        private Float score;

        @SuppressWarnings("unchecked")
        public T text( final String text )
        {
            this.text = text;
            return (T) this;
        }

        @SuppressWarnings("unchecked")
        public T score( final Float score )
        {
            this.score = score;
            return (T) this;
        }

        public abstract SuggestionOption build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy