public class LinkedScheduledEntries<K,V> extends Object implements ScheduledEntries<K,V>
ScheduledEntries implemented using a ConcurrentDirectDeque.
Both #add(Object, Comparable) and remove(Object) run in O(1) time.| Constructor and Description |
|---|
LinkedScheduledEntries() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(K key,
V value)
Adds an entry using the specified key and value.
|
void |
forEach(Consumer<? super Map.Entry<K,V>> action) |
boolean |
isSorted()
Indicates whether the entries are sorted, or if iteration order recapitulates insertion order.
|
Iterator<Map.Entry<K,V>> |
iterator() |
Map.Entry<K,V> |
peek()
Returns, but does not remove, the first entry.
|
void |
remove(K key)
Removes the entry with the specified key.
|
Spliterator<Map.Entry<K,V>> |
spliterator() |
public boolean isSorted()
ScheduledEntriesisSorted in interface ScheduledEntries<K,V>public void add(K key, V value)
ScheduledEntriesadd in interface ScheduledEntries<K,V>key - an entry keyvalue - an entry valuepublic void remove(K key)
ScheduledEntriesremove in interface ScheduledEntries<K,V>key - an entry keypublic Map.Entry<K,V> peek()
ScheduledEntriespeek in interface ScheduledEntries<K,V>public Spliterator<Map.Entry<K,V>> spliterator()
spliterator in interface Iterable<Map.Entry<K,V>>Copyright © 2022 JBoss by Red Hat. All rights reserved.