// Path: contrast-finder-api/src/main/java/org/opens/colorfinder/result/ColorResult.java
// public interface ColorResult {
// 
//     /**
//      * 
//      * @param foreground
//      * @param backgroud
//      * @param threashold 
//      */
//     void setSubmittedColors(Color foreground, Color backgroud, Float threashold);
//     
//     /**
//      * 
//      * @return 
//      */
//     ColorCombinaison getSubmittedCombinaisonColor();
//     
//     /**
//      * 
//      * @return 
//      */
//     boolean isCombinaisonValid();
//     
//     /**
//      * 
//      * @return 
//      */
//     Collection<ColorCombinaison> getSuggestedColors();
//     
//     /**
//      * 
//      * @return 
//      */
//     int getNumberOfSuggestedColors();
//     
//     /**
//      * 
//      * @param combinaison 
//      */
//     void addSuggestedColor(ColorCombinaison combinaison);
//     
//     /**
//      * 
//      * @return 
//      */
//     Float getThreashold();
//     
//     /**
//      * 
//      * @return the number of tested colors
//      */
//     int getNumberOfTestedColors();
// 
//     /**
//      * set the number of tested colors
//      */
//     void setNumberOfTestedColors(int testedColors);
// 
// }
// 
// Path: contrast-finder-impl/src/main/java/org/opens/colorfinder/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.opens.colorfinder.result.ColorResult;
import org.opens.colorfinder.result.ColorResultImpl;
/*
 * Contrast Finder
 * Copyright (C) 2008-2013  Open-S Company
 *
 * 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: open-s AT open-s DOT com
 */ 

package org.opens.colorfinder.result.factory;


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

    @Override
    public ColorResult getColorResult() {
// Path: contrast-finder-api/src/main/java/org/opens/colorfinder/result/ColorResult.java
// public interface ColorResult {
// 
//     /**
//      * 
//      * @param foreground
//      * @param backgroud
//      * @param threashold 
//      */
//     void setSubmittedColors(Color foreground, Color backgroud, Float threashold);
//     
//     /**
//      * 
//      * @return 
//      */
//     ColorCombinaison getSubmittedCombinaisonColor();
//     
//     /**
//      * 
//      * @return 
//      */
//     boolean isCombinaisonValid();
//     
//     /**
//      * 
//      * @return 
//      */
//     Collection<ColorCombinaison> getSuggestedColors();
//     
//     /**
//      * 
//      * @return 
//      */
//     int getNumberOfSuggestedColors();
//     
//     /**
//      * 
//      * @param combinaison 
//      */
//     void addSuggestedColor(ColorCombinaison combinaison);
//     
//     /**
//      * 
//      * @return 
//      */
//     Float getThreashold();
//     
//     /**
//      * 
//      * @return the number of tested colors
//      */
//     int getNumberOfTestedColors();
// 
//     /**
//      * set the number of tested colors
//      */
//     void setNumberOfTestedColors(int testedColors);
// 
// }
// 
// Path: contrast-finder-impl/src/main/java/org/opens/colorfinder/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: contrast-finder-impl/src/main/java/org/opens/colorfinder/result/factory/ColorResultFactoryImpl.java
import org.opens.colorfinder.result.ColorResult;
import org.opens.colorfinder.result.ColorResultImpl;

/*
 * Contrast Finder
 * Copyright (C) 2008-2013  Open-S Company
 *
 * 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: open-s AT open-s DOT com
 */ 

package org.opens.colorfinder.result.factory;


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

    @Override
    public ColorResult getColorResult() {
        return (new ColorResultImpl(new ColorCombinaisonFactoryImpl()));