public class LRUSetCache<E> extends AbstractSet<E> implements Set<E>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CACHE_SIZE |
static float |
DEFAULT_LOAD_FACTOR |
| Constructor and Description |
|---|
LRUSetCache() |
LRUSetCache(int cache) |
LRUSetCache(int cache,
float loadFactor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
Slightly breaking set contract, returns true
iff element was not in cache.
|
void |
clear() |
boolean |
contains(Object e)
True if cache contains the element,
false otherwise.
|
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object arg0) |
int |
size() |
equals, hashCode, removeAlladdAll, containsAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static int DEFAULT_CACHE_SIZE
public static float DEFAULT_LOAD_FACTOR
public LRUSetCache()
public LRUSetCache(int cache)
public LRUSetCache(int cache,
float loadFactor)
public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean contains(Object e)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public boolean remove(Object arg0)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>Copyright © 2020. All rights reserved.