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

org.lastbamboo.common.ice.candidate.IceCandidatePairComparator Maven / Gradle / Ivy

package org.lastbamboo.common.ice.candidate;

import java.util.Comparator;


/**
 * Comparator for ICE candidate pairs. 
 */
public class IceCandidatePairComparator implements Comparator
    {
    
    public int compare(final IceCandidatePair pair1, 
        final IceCandidatePair pair2)
        {
        final long pair1Priority = pair1.getPriority();
        final long pair2Priority = pair2.getPriority();
        
        if (pair1Priority > pair2Priority) return -1;
        if (pair1Priority < pair2Priority) return 1;
        return 0;
        }

    }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy