public final class RMCollectionUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RMCollectionUtils.Difference
This enum represents a change in an entry between 2 collections.
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V> RMCollectionUtils.Difference |
diffKey(Map<K,V> from,
Map<K,V> to,
K key)
Determines the change in a Map entry between two Maps.
|
static <T> T |
head(List<T> l)
Returns the head (element at index 0) of the provided List.
|
static <T> List<T> |
tail(List<T> l)
Returns the tail of the provided List i.e. the sublist which contains
all elements of the given list except the
head. |
public static <T> T head(List<T> l)
T - the type of the List.l - the list whose head is sought.null for the empty list.NullPointerException - if l is nullpublic static <T> List<T> tail(List<T> l)
head.T - the type of the List.l - the list whose tail is sought.NullPointerException - if l is nullUnsupportedOperationException - if the provided list was empty.public static <K,V> RMCollectionUtils.Difference diffKey(Map<K,V> from, Map<K,V> to, K key)
K - the type of the key.V - the type of the value.from - the first collection.to - the second collection.key - the key identifying the entry.RMCollectionUtils.Difference.IllegalArgumentException - if key is null.Copyright © 2005–2016 Alfresco Software. All rights reserved.