public class AirlineUtils extends Object
Constructor and Description |
---|
AirlineUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
arrayToList(T[] array) |
static <T> T |
find(Iterable<T> collection,
org.apache.commons.collections4.Predicate<T> predicate,
T defaultValue) |
static <T> T |
first(Iterable<T> iterable) |
static <T> T |
first(Iterable<T> iterable,
T defaultValue) |
static <T> T |
first(Iterator<T> iterator) |
static <T> T |
first(Iterator<T> iter,
T defaultValue) |
static <T> Set<T> |
intersection(Set<T> a,
Set<T> b) |
static <T> T |
last(Iterable<T> iterable) |
static <T> T |
last(Iterable<T> iterable,
T defaultValue) |
static <T> T |
last(Iterator<T> iterator) |
static <T> T |
last(Iterator<T> iter,
T defaultValue) |
static <T> List<T> |
listCopy(Collection<T> collection) |
static <T> List<T> |
listCopy(Iterable<T> iterable) |
static <T> List<T> |
singletonList(T item) |
static <K,V> Map<K,V> |
singletonMap(K key,
V value) |
static <T> Set<T> |
singletonSet(T item) |
static String |
toOrdinal(int value) |
static String |
toRangeString(Object min,
boolean minInclusive,
Object max,
boolean maxInclusive)
Formats the range for display
|
static <T> List<T> |
unmodifiableListCopy(Collection<T> collection) |
static <T> List<T> |
unmodifiableListCopy(Iterable<T> iterable) |
static <T> List<T> |
unmodifiableListCopy(T[] array) |
static <K,V> Map<K,V> |
unmodifiableMapCopy(Map<K,V> map) |
static <T> Set<T> |
unmodifiableSetCopy(Iterable<T> iterable) |
static <T> Set<T> |
unmodifiableSetCopy(Set<T> set) |
public static <T> List<T> arrayToList(T[] array)
public static <T> T first(Iterable<T> iterable)
public static <T> T first(Iterator<T> iterator)
public static <T> T first(Iterable<T> iterable, T defaultValue)
public static <T> T first(Iterator<T> iter, T defaultValue)
public static <T> T last(Iterable<T> iterable)
public static <T> T last(Iterator<T> iterator)
public static <T> T last(Iterable<T> iterable, T defaultValue)
public static <T> T last(Iterator<T> iter, T defaultValue)
public static <T> List<T> singletonList(T item)
public static <T> Set<T> singletonSet(T item)
public static <K,V> Map<K,V> singletonMap(K key, V value)
public static <T> List<T> listCopy(Collection<T> collection)
public static <T> List<T> unmodifiableListCopy(Collection<T> collection)
public static <T> List<T> unmodifiableListCopy(T[] array)
public static <T> T find(Iterable<T> collection, org.apache.commons.collections4.Predicate<T> predicate, T defaultValue)
public static String toRangeString(Object min, boolean minInclusive, Object max, boolean maxInclusive)
min
- Minimum (may be null for no minimum)minInclusive
- Whether the minimum is inclusivemax
- Maximum (may be null for no maximum)maxInclusive
- Whether the maximum is inclusivepublic static String toOrdinal(int value)
Copyright © 2012–2017. All rights reserved.