public abstract class Collections extends Object
Modifier and Type | Method and Description |
---|---|
static <Type> String |
stringify(Collection<Type> collection,
IStringify<Type> stringify)
Creates a string representation of the given collection, using its values.
|
static <Type> String |
stringify(Collection<Type> collection,
String separator,
IStringify<Type> stringify)
Creates a string representation of the given collection, using its values.
|
static <Type> String |
stringify(Collection<Type> collection,
String prefix,
String suffix,
boolean includePrefixAndSuffixOnlyIfCollectionNotEmpty,
String separator,
IStringify<Type> stringify)
Creates a string representation of the given collection, using its values.
|
static <Type> String |
stringify(Collection<Type> collection,
String prefix,
String suffix,
String separator,
IStringify<Type> stringify)
Creates a string representation of the given collection, using its values.
|
static <From,To> Collection<To> |
transform(Collection<From> original,
Transformer<From,To> transformer)
Returns a new collection using the given transformer to transform the items.
|
static <T> Collection<T> |
union(Collection<T>... cs)
Returns the union of the given collections.
|
public static <From,To> Collection<To> transform(Collection<From> original, Transformer<From,To> transformer) throws PortalException
original
- the original collection.transformer
- the transformed to be used.PortalException
public static <Type> String stringify(Collection<Type> collection, IStringify<Type> stringify) throws PortalException
null
before concatenating to the result string.collection
- the collection.stringify
- the stringfy to be used to convert values in strings.PortalException
public static <Type> String stringify(Collection<Type> collection, String separator, IStringify<Type> stringify) throws PortalException
null
before concatenating to the result string.collection
- the collection.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert values in strings.PortalException
public static <Type> String stringify(Collection<Type> collection, String prefix, String suffix, String separator, IStringify<Type> stringify) throws PortalException
null
before concatenating to the result string.collection
- the collection.prefix
- the prefix to be appended in final string.suffix
- the suffix to be appended in final string.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert values in strings.PortalException
public static <Type> String stringify(Collection<Type> collection, String prefix, String suffix, boolean includePrefixAndSuffixOnlyIfCollectionNotEmpty, String separator, IStringify<Type> stringify) throws PortalException
null
before concatenating to the result string.collection
- the collection.prefix
- the prefix to be appended in final string.suffix
- the suffix to be appended in final string.includePrefixAndSuffixOnlyIfCollectionNotEmpty
- indicates whether prefix and suffix should be added only if the given collection is not empty.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert values in strings.PortalException
@SafeVarargs public static <T> Collection<T> union(Collection<T>... cs)
cs
- the collections.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.