public enum Nth extends Enum<Nth>
Enum Constant and Description |
---|
FIRST
The first.
|
SECOND
The second.
|
Modifier and Type | Method and Description |
---|---|
static <T> BiFunction<T,T,Nth> |
alternate()
Returns a stateful
BiFunction . |
static <T extends Comparable> |
maxFirst(T a,
T b) |
static <T> Nth |
maxFirst(T a,
T b,
Comparator<? super T> cmp) |
static <T extends Comparable> |
minFirst(T a,
T b) |
static <T> Nth |
minFirst(T a,
T b,
Comparator<? super T> cmp) |
static Nth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Nth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Nth FIRST
public static final Nth SECOND
public static Nth[] values()
for (Nth c : Nth.values()) System.out.println(c);
public static Nth valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <T extends Comparable> Nth minFirst(T a, T b)
public static <T> Nth minFirst(T a, T b, Comparator<? super T> cmp)
T
- a
- b
- cmp
- public static <T extends Comparable> Nth maxFirst(T a, T b)
T
- a
- b
- public static <T> Nth maxFirst(T a, T b, Comparator<? super T> cmp)
T
- a
- b
- cmp
- public static <T> BiFunction<T,T,Nth> alternate()
BiFunction
. Don't cache or reuse it.T
- Copyright © 2019. All rights reserved.