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

com.recombee.api_client.bindings.Recommendation Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package com.recombee.api_client.bindings;

import java.util.Map;

public class Recommendation extends RecombeeBinding {

    /**
    * Id of the recommended item
    */
    protected String id;
    /**
    * Property values of the recommended item (only if the recommendation requested was set to return property values)
    */
    protected Map values;

    public Recommendation() {}

    public Recommendation(String id)
    {
        this.id = id;
    }

    public Recommendation(String id, Map values)
    {
        this.id = id;
        this.values = values;
    }

    public String getId() {
         return this.id;
    }

    public Map getValues() {

        if(values == null)
            throw new IllegalStateException("getValues() is possible only if the recommendation requested was set to return property values (invoke setReturnProperties(true))");

        return this.values;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy