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

com.graphaware.reco.generic.log.Logger Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2013-2016 GraphAware
 *
 * This file is part of the GraphAware Framework.
 *
 * GraphAware Framework is free software: you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of
 * the GNU General Public License along with this program.  If not, see
 * .
 */

package com.graphaware.reco.generic.log;

import com.graphaware.reco.generic.context.Context;
import com.graphaware.reco.generic.result.Recommendation;

import java.util.List;

/**
 * A component capable of recording / logging information about the computation of recommendations.
 *
 * @param  type of the recommendations produced.
 * @param   type of the item recommendations are for / based on.
 */
public interface Logger {

    /**
     * Record / log recommendations.
     *
     * @param input           for which the recommendations have been produced. Must not be null.
     * @param recommendations that have been computed. Must not be null.
     * @param context         in which the recommendations were produced.
     */
    void log(IN input, List> recommendations, Context context);

    /**
     * Convert recommendation information to String.
     *
     * @param input           for which the recommendations have been produced. Must not be null.
     * @param recommendations that have been computed. Must not be null.
     * @param context         in which the recommendations were produced.
     * @return string representation of the stuff this logger normally logs.
     */
    String toString(IN input, List> recommendations, Context context);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy