public class LazyRemovalSet<V>
extends java.lang.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(java.util.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) |
java.util.Set<V> |
nonRemovedValues()
Adds all value which have not been marked as removable to the returned set
|
java.lang.String |
printCache() |
java.lang.String |
printCache(LazyRemovalSet.Printable<V> print_function) |
void |
remove(V val) |
void |
remove(V val,
boolean force) |
void |
removeAll(java.util.Collection<V> values) |
void |
removeAll(java.util.Collection<V> values,
boolean force) |
void |
removeMarkedElements()
Removes elements marked as removable
|
void |
removeMarkedElements(boolean force)
Removes elements marked as removable
|
void |
retainAll(java.util.Collection<V> values) |
void |
retainAll(java.util.Collection<V> values,
boolean force) |
int |
size() |
java.lang.String |
toString() |
java.util.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(java.util.Collection<V> vals)
public boolean contains(V val)
public void remove(V val)
public void remove(V val, boolean force)
public void removeAll(java.util.Collection<V> values)
public void removeAll(java.util.Collection<V> values, boolean force)
public void clear(boolean force)
public void retainAll(java.util.Collection<V> values)
public void retainAll(java.util.Collection<V> values, boolean force)
public java.util.Set<V> values()
public java.util.Set<V> nonRemovedValues()
public int size()
public java.lang.String printCache()
public java.lang.String printCache(LazyRemovalSet.Printable<V> print_function)
public java.lang.String toString()
toString
in class java.lang.Object
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 ? 1998-2009 Bela Ban / Red Hat. All Rights Reserved.