public class LazyRemovalSet<V> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
LazyRemovalSet.Entry<V> |
static interface |
LazyRemovalSet.Printable<V> |
Constructor and Description |
---|
LazyRemovalSet() |
LazyRemovalSet(int max_elements,
long max_age) |
Modifier and Type | Method and Description |
---|---|
void |
add(Collection<V> vals) |
void |
add(V... vals) |
void |
add(V val) |
void |
clear(boolean force) |
boolean |
contains(V val) |
protected LazyRemovalSet.Entry<V> |
find(V val) |
Set<V> |
nonRemovedValues()
Adds all value which have not been marked as removable to the returned set
|
String |
printCache() |
String |
printCache(LazyRemovalSet.Printable<V> print_function) |
void |
remove(V val) |
void |
remove(V val,
boolean force) |
void |
removeAll(Collection<V> values) |
void |
removeAll(Collection<V> values,
boolean force) |
void |
removeMarkedElements()
Removes elements marked as removable
|
void |
removeMarkedElements(boolean force)
Removes elements marked as removable
|
void |
retainAll(Collection<V> values) |
void |
retainAll(Collection<V> values,
boolean force) |
int |
size() |
String |
toString() |
Set<V> |
values() |
public LazyRemovalSet()
public LazyRemovalSet(int max_elements, long max_age)
public void add(V val)
public void add(V... vals)
public void add(Collection<V> vals)
public boolean contains(V val)
public void remove(V val)
public void remove(V val, boolean force)
public void removeAll(Collection<V> values)
public void removeAll(Collection<V> values, boolean force)
public void clear(boolean force)
public void retainAll(Collection<V> values)
public void retainAll(Collection<V> values, boolean force)
public Set<V> nonRemovedValues()
public int size()
public String printCache()
public String printCache(LazyRemovalSet.Printable<V> print_function)
protected LazyRemovalSet.Entry<V> find(V val)
public void removeMarkedElements(boolean force)
force
- If set to true, all elements marked as 'removable' will get removed, regardless of expirationpublic void removeMarkedElements()
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.