Class AirlineUtils
java.lang.Object
com.github.rvesse.airline.utils.AirlineUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tfind(Iterable<T> collection, org.apache.commons.collections4.Predicate<T> predicate, T defaultValue) static <T> Tstatic <T> Tstatic <T> Tstatic <T> Tstatic <T> Set<T> intersection(Set<T> a, Set<T> b) static <T> Tstatic <T> Tstatic <T> Tstatic <T> Tstatic <T> List<T> static <T> List<T> listCopy(Collection<T> collection) static <K,V> Map <K, V> singletonMap(K key, V value) static StringtoOrdinal(int value) static StringtoRangeString(Object min, boolean minInclusive, Object max, boolean maxInclusive) Formats the range for displaystatic <T> List<T> unmodifiableListCopy(Iterable<T> iterable) static <T> List<T> unmodifiableListCopy(Collection<T> collection) 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)
-
Constructor Details
-
AirlineUtils
public AirlineUtils()
-
-
Method Details
-
first
-
first
-
first
-
first
-
last
-
last
-
last
-
last
-
singletonMap
-
intersection
-
listCopy
-
listCopy
-
unmodifiableListCopy
-
unmodifiableListCopy
-
unmodifiableListCopy
-
unmodifiableMapCopy
-
unmodifiableSetCopy
-
unmodifiableSetCopy
-
find
public static <T> T find(Iterable<T> collection, org.apache.commons.collections4.Predicate<T> predicate, T defaultValue) -
toRangeString
public static String toRangeString(Object min, boolean minInclusive, Object max, boolean maxInclusive) Formats the range for display- Parameters:
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 inclusive- Returns:
- Human readable range
-
toOrdinal
-