/**
 * 
         -------- Copyright (C) [2012]  [Kristofer SCHWEIGER & Niklas FLORIAN1]---------

    This program 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 2 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, 
 *  write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA

 * 
 * For any licensing issues please contact us under following adress: Mosaik.Projekt.2012@gmail.com
 */

package dataBase.search.comparator.hash;

import java.util.Comparator;

import dataBase.subPicture.SubPicture;


public class ComparatorRGB_G implements Comparator<SubPicture>{

	@Override
	public int compare(SubPicture p1, SubPicture p2) {
		
		float val1 = p1.avg.g;
		float val2 = p2.avg.g;
		
		if(val1 > val2)
			return 1;
		else if(val1 < val2)
			return -1;
		else
			return 0;
	}
	
}
