Converts a comma separated list of categories into a {@link List}

@param categoriesList
@return
19925
public static List<String> categoriesFromString(String categoriesList) {
		List<String> result = new ArrayList<String>();
		try {
			if (categoriesList != null) {
				String[] categories = categoriesList.split(DescribeService.CATEGORY_SEPARATOR);
				if (categories != null && categories.length != 0) {
					for (String cat : categories) {
						result.add(cat);
					}
				}
			}
		} catch (Exception ignore) {
			logger.warn("DescribeService", ignore);
		}

		return result;
	}
31426
public static String serializeList(List<?> list) {
        if (list == null) {
            list = new ArrayList<String>();
        }
        XStream xstream = new XStream(new DomDriver());
        return xstream.toXML(list);
    }
1089311
public List<String> toList() {
        ArrayList<String> list = new ArrayList<String>();
        for (StringGrabber sg : mSgList) {
            list.add(sg.toString());
        }
        return list;

    }
952788
public Map<CategoryId, Category> getCategories() {
    Map<CategoryId, Category> map = new HashMap<>();
    for (Rule rule : getAllRules()) {
      map.put(rule.getCategory().getId(), rule.getCategory());
    }
    return map;
  }
10199
public static <T extends Comparable<? super T>> List<T> sort(final List<T> list) {
        Validate.notNull(list, "Cannot execute list sort: list is null");
        final Object[] a = list.toArray();
        Arrays.sort(a);
        
        return fillNewList(a, list.getClass());
    }
838191
public String getCategoriesAsString() {
		List<String> categories = getCategories();
		String categoriesStr = "";
		if (categories != null && !categories.isEmpty()) {
			categoriesStr = StringUtils.join(categories.toArray(), CATEGORY_SEPARATOR);
		}

		return categoriesStr;
	}
1118242
public static <T> String generateCommaSeparatedList(Collection<T> list) {
        if (list == null || list.size() == 0) {
            return "";
        }
        StringBuilder result = new StringBuilder();
        for (Object obj : list) {
            result.append(',').append(obj.toString());
        }
        return result.length() == 0 ? "" : result.substring(1);
    }
1140762
protected List<T> sort(final List<T> unsortedList)
	{
		final SortParam<S> sortParam = getSort();
		if (sortParam != null)
		{
			final String property = (String)sortParam.getProperty();
			final boolean ascending = sortParam.isAscending();
			ListExtensions.sortByProperty(unsortedList, property, ascending);
		}
		return unsortedList;
	}
1064418
public List<CmsCategory> getTopItems() {

        List<CmsCategory> categories = new ArrayList<CmsCategory>();
        String matcher = Pattern.quote(m_mainCategoryPath) + "[^/]*/";
        for (CmsCategory category : m_categories) {
            if (category.getPath().matches(matcher)) {
                categories.add(category);
            }
        }
        return categories;
    }
704760
public static <T> List<T> toImmutableList(final List<? extends T> list) {
    switch (list.size()) {
      case 0:
        return Collections.emptyList();
      case 1:
        return Collections.singletonList(list.get(0));
      default:
        return Collections.unmodifiableList(list);
    }
  }
423550
@Override
    public void setCategories(final List<SyndCategory> categories) {
        getDCModule().setSubjects(SyndCategoryListFacade.convertElementsSyndCategoryToSubject(categories));
    }
696369
private void categoryTreeToList(List<CmsCategoryBean> categoryList, List<CmsCategoryTreeEntry> entries) {

        if (entries == null) {
            return;
        }
        // skipping the root tree entry where the path property is empty
        for (CmsCategoryTreeEntry entry : entries) {
            CmsCategoryBean bean = new CmsCategoryBean(entry);
            categoryList.add(bean);
            categoryTreeToList(categoryList, entry.getChildren());
        }
    }
620863
public static <T> String listToString(List<T> list) {
    StringBuilder sb = new StringBuilder();
    for (T s : list) {
      if (sb.length() != 0) {
        sb.append(" ");
      }
      sb.append(s);
    }
    return sb.toString();
  }
777829
public static Map<String, Object> transformPrincipalAttributesListIntoMap(final List<String> list) {
        val map = transformPrincipalAttributesListIntoMultiMap(list);
        return CollectionUtils.wrap(map);
    }
23055
private static <E> List<E> toList(Iterable<E> iterable)
	{
		List<E> list = new ArrayList<>();
		iterable.forEach(list::add);
		return list;
	}
245905
protected <T> List<T> toArrayList(List<T> list) {
        if (list == null) {
            return null;
        }
        if (!list.getClass().equals(ArrayList.class)) {
            list = new ArrayList<>(list);
        }
        return list;
    }
570433
private List<Property> getPropertiesForCategory(List<Property> localProperties, String category) {
        List<Property> categoryProperties = new ArrayList<Property>();
        for (Property property : localProperties) {
            if (property.getCategory() != null && property.getCategory().equals(category)) {
                categoryProperties.add(property);
            }
        }
        return categoryProperties;
    }