List of usage examples for com.liferay.portal.kernel.util StringUtil add
public static String add(String s, String add, String delimiter, boolean allowDuplicates)
add to string s that represents a delimited list of strings, using a specified delimiter and optionally allowing duplicate words. From source file:au.com.permeance.liferay.portlet.util.StringUtilHelper.java
License:Open Source License
public static String addArrayItems(String str, String[] items, String delimiter, boolean allowDuplicates) { String result = str;/* w ww .ja va 2s. co m*/ if (items != null) { for (String item : items) { result = StringUtil.add(result, item, delimiter, allowDuplicates); } } return result; }
From source file:com.liferay.portlet.shopping.model.impl.ShoppingCartImpl.java
License:Open Source License
public void addItemId(long itemId, String fields) { setItemIds(StringUtil.add(getItemIds(), itemId + fields, StringPool.COMMA, true)); }