public class CommonUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <A> List<A> |
addOrCreateList(List<A> list,
A item)
Adds an item to a possibly null list to defer the allocation as long as possible.
|
static boolean |
equals(Object a,
Object b) |
static int |
hash(Object... values)
Polyfill of Objects.hash that can be used on API<19.
|
public static <A> List<A> addOrCreateList(List<A> list, A item)
list
- the nullable list.item
- the item to add.public static int hash(Object... values)