public static enum SortedLists.KeyPresentBehavior extends java.lang.Enum<SortedLists.KeyPresentBehavior>
Enum Constant and Description |
---|
ANY_PRESENT
Return the index of any list element that compares as equal to the key.
|
FIRST_AFTER
Return the index of the first list element that compares as greater than the key, or
list.size() if there is no such element. |
FIRST_PRESENT
Return the index of the first list element that compares as equal to the key.
|
LAST_BEFORE
Return the index of the last list element that compares as less than the key, or
-1
if there is no such element. |
LAST_PRESENT
Return the index of the last list element that compares as equal to the key.
|
Modifier and Type | Method and Description |
---|---|
abstract <E> int |
resultIndex(java.util.Comparator<? super E> comparator,
E key,
java.util.List<? extends E> list,
int foundIndex) |
static SortedLists.KeyPresentBehavior |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SortedLists.KeyPresentBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SortedLists.KeyPresentBehavior ANY_PRESENT
public static final SortedLists.KeyPresentBehavior LAST_PRESENT
public static final SortedLists.KeyPresentBehavior FIRST_PRESENT
public static final SortedLists.KeyPresentBehavior FIRST_AFTER
list.size()
if there is no such element.public static final SortedLists.KeyPresentBehavior LAST_BEFORE
-1
if there is no such element.public static SortedLists.KeyPresentBehavior[] values()
for (SortedLists.KeyPresentBehavior c : SortedLists.KeyPresentBehavior.values()) System.out.println(c);
public static SortedLists.KeyPresentBehavior valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract <E> int resultIndex(java.util.Comparator<? super E> comparator, E key, java.util.List<? extends E> list, int foundIndex)