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

be.selckin.ws.util.java2php.Utils Maven / Gradle / Ivy

package be.selckin.ws.util.java2php;

import be.selckin.ws.util.java2php.php.PhpService;
import be.selckin.ws.util.java2php.php.PhpType;
import com.google.common.collect.Lists;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Utils {

    public static final Comparator SERVICE_COMPARATOR = new Comparator() {
        @Override
        public int compare(PhpService o1, PhpService o2) {
            return o1.getName().compareTo(o2.getName());
        }
    };
    public static final Comparator PHP_TYPE_COMPARATOR = new Comparator() {
        @Override
        public int compare(PhpType o1, PhpType o2) {
            return o1.getName().compareTo(o2.getName());
        }
    };

    public static  List sort(Iterable services, Comparator comparator) {
        List sorted = Lists.newArrayList(services);
        Collections.sort(sorted, comparator);
        return sorted;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy