// Path: engine/api/src/main/java/org/asqatasun/contrastfinder/result/ColorResult.java
// public interface ColorResult {
// 
//     /**
//      * @param foreground
//      * @param backgroud
//      * @param threashold
//      */
//     void setSubmittedColors(Color foreground, Color backgroud, Float threashold);
// 
//     /**
//      * @return ColorCombinaison object
//      */
//     ColorCombinaison getSubmittedCombinaisonColor();
// 
//     /**
//      * @return true if is valid combinaison
//      */
//     boolean isCombinaisonValid();
// 
//     /**
//      *
//      * @return Collection object of ColorCombinaison objects
//      */
//     Collection<ColorCombinaison> getSuggestedColors();
// 
//     /**
//      * @return the number of suggested colors
//      */
//     int getNumberOfSuggestedColors();
// 
//     /**
//      * @param combinaison
//      */
//     void addSuggestedColor(ColorCombinaison combinaison);
// 
//     /**
//      * @return Threashold
//      */
//     Float getThreashold();
// 
//     /**
//      * @return the number of tested colors
//      */
//     int getNumberOfTestedColors();
// 
//     /**
//      * set the number of tested colors
//      * @param testedColors
//      */
//     void setNumberOfTestedColors(int testedColors);
// 
// }
// 
// Path: engine/impl/src/main/java/org/asqatasun/contrastfinder/result/ColorResultImpl.java
// public class ColorResultImpl implements ColorResult {
// 
//     private static final int MAX_SUGGESTED_COLOR = 20;
//     /* the colorCombinaisonFactory instance*/
//     private ColorCombinaisonFactory colorCombinaisonFactory;
//     /* the submitted color combinaison*/
//     private ColorCombinaison submittedColors;
//     /* the suggested colors */
//     private Set<ColorCombinaison> suggestedColors =
//             new LinkedHashSet<ColorCombinaison>();
//     private int numberOfTestedColors;
// 
//     /*
//      * Constructor
//      */
//     public ColorResultImpl(ColorCombinaisonFactory colorCombinaisonFactory) {
//         this.colorCombinaisonFactory = colorCombinaisonFactory;
//     }
// 
//     @Override
//     public Float getThreashold() {
//         return Float.valueOf(submittedColors.getThreshold().floatValue());
//     }
// 
//     @Override
//     public void setSubmittedColors(Color colorToChange, Color colorToKeep, Float threashold) {
//         submittedColors =
//                 colorCombinaisonFactory.getColorCombinaison(
//                 colorToChange,
//                 colorToKeep,
//                 Double.valueOf(threashold));
//     }
// 
//     @Override
//     public ColorCombinaison getSubmittedCombinaisonColor() {
//         return submittedColors;
//     }
// 
//     @Override
//     public boolean isCombinaisonValid() {
//         return submittedColors.isContrastValid();
//     }
// 
//     @Override
//     public Collection<ColorCombinaison> getSuggestedColors() {
//         return suggestedColors;
//     }
// 
//     @Override
//     public void addSuggestedColor(ColorCombinaison colorCombinaison) {
//         colorCombinaison.setDistanceFromInitialColor(DistanceCalculator.calculate(submittedColors.getColor(), colorCombinaison.getColor()));
//         suggestedColors.add(colorCombinaison);
//     }
// 
//     @Override
//     public int getNumberOfSuggestedColors() {
//         return suggestedColors.size();
//     }
// 
//     /**
//      *
//      * @return whether the max number suggested colors is reached
//      */
//     public boolean isSuggestedColorsFull() {
//         return getNumberOfSuggestedColors() >= MAX_SUGGESTED_COLOR;
//     }
// 
//     @Override
//     public int getNumberOfTestedColors() {
//         return numberOfTestedColors;
//     }
// 
//     @Override
//     public void setNumberOfTestedColors(int numberOfTestedColors) {
//         this.numberOfTestedColors = numberOfTestedColors;
//     }
// }


import org.asqatasun.contrastfinder.result.ColorResult;
import org.asqatasun.contrastfinder.result.ColorResultImpl;
/*
 * Contrast Finder
 * Copyright (C) 2008-2019   Contrast-Finder.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: asqatasun AT asqatasun DOT org
 */

package org.asqatasun.contrastfinder.result.factory;


/**
 *
 * @author alingua
 */
public class ColorResultFactoryImpl implements ColorResultFactory {

    @Override
// Path: engine/api/src/main/java/org/asqatasun/contrastfinder/result/ColorResult.java
// public interface ColorResult {
// 
//     /**
//      * @param foreground
//      * @param backgroud
//      * @param threashold
//      */
//     void setSubmittedColors(Color foreground, Color backgroud, Float threashold);
// 
//     /**
//      * @return ColorCombinaison object
//      */
//     ColorCombinaison getSubmittedCombinaisonColor();
// 
//     /**
//      * @return true if is valid combinaison
//      */
//     boolean isCombinaisonValid();
// 
//     /**
//      *
//      * @return Collection object of ColorCombinaison objects
//      */
//     Collection<ColorCombinaison> getSuggestedColors();
// 
//     /**
//      * @return the number of suggested colors
//      */
//     int getNumberOfSuggestedColors();
// 
//     /**
//      * @param combinaison
//      */
//     void addSuggestedColor(ColorCombinaison combinaison);
// 
//     /**
//      * @return Threashold
//      */
//     Float getThreashold();
// 
//     /**
//      * @return the number of tested colors
//      */
//     int getNumberOfTestedColors();
// 
//     /**
//      * set the number of tested colors
//      * @param testedColors
//      */
//     void setNumberOfTestedColors(int testedColors);
// 
// }
// 
// Path: engine/impl/src/main/java/org/asqatasun/contrastfinder/result/ColorResultImpl.java
// public class ColorResultImpl implements ColorResult {
// 
//     private static final int MAX_SUGGESTED_COLOR = 20;
//     /* the colorCombinaisonFactory instance*/
//     private ColorCombinaisonFactory colorCombinaisonFactory;
//     /* the submitted color combinaison*/
//     private ColorCombinaison submittedColors;
//     /* the suggested colors */
//     private Set<ColorCombinaison> suggestedColors =
//             new LinkedHashSet<ColorCombinaison>();
//     private int numberOfTestedColors;
// 
//     /*
//      * Constructor
//      */
//     public ColorResultImpl(ColorCombinaisonFactory colorCombinaisonFactory) {
//         this.colorCombinaisonFactory = colorCombinaisonFactory;
//     }
// 
//     @Override
//     public Float getThreashold() {
//         return Float.valueOf(submittedColors.getThreshold().floatValue());
//     }
// 
//     @Override
//     public void setSubmittedColors(Color colorToChange, Color colorToKeep, Float threashold) {
//         submittedColors =
//                 colorCombinaisonFactory.getColorCombinaison(
//                 colorToChange,
//                 colorToKeep,
//                 Double.valueOf(threashold));
//     }
// 
//     @Override
//     public ColorCombinaison getSubmittedCombinaisonColor() {
//         return submittedColors;
//     }
// 
//     @Override
//     public boolean isCombinaisonValid() {
//         return submittedColors.isContrastValid();
//     }
// 
//     @Override
//     public Collection<ColorCombinaison> getSuggestedColors() {
//         return suggestedColors;
//     }
// 
//     @Override
//     public void addSuggestedColor(ColorCombinaison colorCombinaison) {
//         colorCombinaison.setDistanceFromInitialColor(DistanceCalculator.calculate(submittedColors.getColor(), colorCombinaison.getColor()));
//         suggestedColors.add(colorCombinaison);
//     }
// 
//     @Override
//     public int getNumberOfSuggestedColors() {
//         return suggestedColors.size();
//     }
// 
//     /**
//      *
//      * @return whether the max number suggested colors is reached
//      */
//     public boolean isSuggestedColorsFull() {
//         return getNumberOfSuggestedColors() >= MAX_SUGGESTED_COLOR;
//     }
// 
//     @Override
//     public int getNumberOfTestedColors() {
//         return numberOfTestedColors;
//     }
// 
//     @Override
//     public void setNumberOfTestedColors(int numberOfTestedColors) {
//         this.numberOfTestedColors = numberOfTestedColors;
//     }
// }


// Path: engine/impl/src/main/java/org/asqatasun/contrastfinder/result/factory/ColorResultFactoryImpl.java
import org.asqatasun.contrastfinder.result.ColorResult;
import org.asqatasun.contrastfinder.result.ColorResultImpl;

/*
 * Contrast Finder
 * Copyright (C) 2008-2019   Contrast-Finder.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: asqatasun AT asqatasun DOT org
 */

package org.asqatasun.contrastfinder.result.factory;


/**
 *
 * @author alingua
 */
public class ColorResultFactoryImpl implements ColorResultFactory {

    @Override
    public ColorResult getColorResult() {