|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.util.BambooCollectionUtils
public class BambooCollectionUtils
Constructor Summary | |
---|---|
BambooCollectionUtils()
|
Method Summary | ||
---|---|---|
static java.util.List<java.lang.String> |
convertToList(java.lang.String s)
|
|
static
|
newArrayList(java.lang.Iterable<? extends E> elements,
java.util.Comparator<? super E> comparator)
Creates a sorted mutable ArrayList consisting of input elements |
|
static
|
newLinkedList(java.lang.Iterable<? extends E> elements,
java.util.Comparator<? super E> comparator)
Creates a sorted mutable LinkedList consisting of input elements |
|
static
|
removeDuplicates(java.util.List<T> input)
|
|
static
|
removeDuplicatesAndSort(java.util.List<T> input,
java.util.Comparator<? super T> c)
|
|
static
|
sortByValue(java.util.Map<K,V> map)
Given a map returns the list of entries in the map sorted by Entry.getValue() in descending order. |
|
static java.util.Set<java.lang.String> |
stringArrayToHashSet(java.lang.String[] values)
|
|
static java.util.List<java.lang.String> |
stringArrayToList(java.lang.String[] s)
|
|
static java.util.List<java.lang.String> |
stringToCollection(java.lang.String s)
Converts a string with a given pattern into a Collection of strings. |
|
static
|
subtract(java.util.Collection<T> a,
java.util.Collection<T> b)
Generic version of ListUtils.subtract |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BambooCollectionUtils()
Method Detail |
---|
@NotNull public static java.util.List<java.lang.String> stringToCollection(java.lang.String s)
s
- string to be analyzed
@NotNull public static java.util.List<java.lang.String> stringArrayToList(@Nullable java.lang.String[] s)
@NotNull public static java.util.Set<java.lang.String> stringArrayToHashSet(@Nullable java.lang.String[] values)
@Nullable public static <T> java.util.List<T> removeDuplicates(@Nullable java.util.List<T> input)
@Nullable public static <T extends java.lang.Comparable<? super T>> java.util.List<T> removeDuplicatesAndSort(java.util.List<T> input, java.util.Comparator<? super T> c)
@Nullable public static java.util.List<java.lang.String> convertToList(@Nullable java.lang.String s)
@NotNull public static <T> java.util.List<T> subtract(@NotNull java.util.Collection<T> a, @NotNull java.util.Collection<T> b)
T
- any typea
- collection Ab
- collection B
public static <E> java.util.List<E> newArrayList(@NotNull java.lang.Iterable<? extends E> elements, @NotNull java.util.Comparator<? super E> comparator)
elements
- Elements to be copiedcomparator
- Comparator used for sorting
public static <E> java.util.List<E> newLinkedList(@NotNull java.lang.Iterable<? extends E> elements, @NotNull java.util.Comparator<? super E> comparator)
elements
- Elements to be copiedcomparator
- Comparator used for sorting
public static <K,V extends java.lang.Comparable<? super V>> java.util.List<java.util.Map.Entry<K,V>> sortByValue(java.util.Map<K,V> map)
map
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |