Example usage for com.liferay.portal.kernel.util ListUtil distinct

List of usage examples for com.liferay.portal.kernel.util ListUtil distinct

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util ListUtil distinct.

Prototype

public static void distinct(List<?> list) 

Source Link

Usage

From source file:com.liferay.marketplace.app.manager.web.internal.util.MarketplaceAppManagerUtil.java

License:Open Source License

public static String[] getCategories(List<App> apps, List<Bundle> bundles) {
    List<String> categories = new ArrayList<>();

    categories.addAll(getAppCategories(apps));
    categories.addAll(getBundleCategories(bundles));

    ListUtil.distinct(categories);
    ListUtil.sort(categories);/*from  w  ww  .java2 s .co  m*/

    categories.add(0, "all-categories");

    return ArrayUtil.toStringArray(categories);
}