Interface ScheduledEntries<K,V>
A collection of scheduled entries with a predictable iteration order.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an entry using the specified key and value.booleanIndicates whether specified key exists among the scheduled entries.booleanisSorted()Indicates whether the entries are sorted, or if iteration order recapitulates insertion order.iterator()static <K,V> ScheduledEntries <K, V> linked()peek()Returns, but does not remove, the first entry.voidRemoves the entry with the specified key.static <K extends Comparable<? super K>,V extends Comparable<? super V>>
ScheduledEntries<K, V> sorted()static <K,V> ScheduledEntries <K, V> sorted(Comparator<Map.Entry<K, V>> comparator) stream()Returns a stream of scheduled entries.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
isSorted
boolean isSorted()Indicates whether the entries are sorted, or if iteration order recapitulates insertion order.- Returns:
- true, if these entries are sorted, false otherwise.
-
add
Adds an entry using the specified key and value.- Parameters:
key- an entry keyvalue- an entry value
-
remove
Removes the entry with the specified key.- Parameters:
key- an entry key
-
contains
Indicates whether specified key exists among the scheduled entries.- Parameters:
key- an entry key- Returns:
- true, if the key is a scheduled entry, false otherwise
-
peek
Returns, but does not remove, the first entry. -
stream
Returns a stream of scheduled entries.- Returns:
- a stream of scheduled entries.
-
iterator
-
linked
-
sorted
static <K extends Comparable<? super K>,V extends Comparable<? super V>> ScheduledEntries<K,V> sorted() -
sorted
-