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

com.github.rmannibucau.playx.cdi.PackageCleaner Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.github.rmannibucau.playx.cdi;

import java.util.ArrayList;
import java.util.Collection;

class PackageCleaner {

    Collection removeOverlaps(final Collection packages) {
        return new ArrayList<>(packages).stream().sorted().collect(ArrayList::new, (output, pck) -> {
            if (output.stream().noneMatch(it -> pck.startsWith(it + '.'))) {
                output.add(pck);
            }
        }, Collection::addAll);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy