001/*
002 *                    PDB web development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 *
015 * Created on May 23, 2009
016 * Created by Andreas Prlic
017 *
018 */
019
020package org.biojava.nbio.structure.align.helper;
021
022import java.util.Comparator;
023
024public class IdxComparator implements Comparator<int[]>
025{
026
027        @Override
028        public int compare(int[] o1, int[] o2)
029        {
030                if (((o1[0]) == (o2[0])) &&
031                                ((o2[1]) == (o2[1])))
032                        return 0;
033                if ( o1[0] < o2[0])
034                        return -1;
035
036                return 1;
037        }
038
039}