[New] Added ObjectFilter.isEmpty()
This commit is contained in:
parent
916f927ccd
commit
a4e63b7de0
|
@ -88,8 +88,8 @@ public class ObjectFilter {
|
||||||
* Default constructor initializing the filter
|
* Default constructor initializing the filter
|
||||||
*/
|
*/
|
||||||
public ObjectFilter() {
|
public ObjectFilter() {
|
||||||
this.cache = new HashMap<>();
|
this.cache = new HashMap<>(1);
|
||||||
this.keySet = new HashSet<>();
|
this.keySet = new HashSet<>(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -179,7 +179,8 @@ public class ObjectFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register, under the given key, the update of the given object. * </p>
|
* Register, under the given key, the update of the given object. *
|
||||||
|
* </p>
|
||||||
* <table border="1">
|
* <table border="1">
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td>Action \ State in Cache</td>
|
* <td>Action \ State in Cache</td>
|
||||||
|
@ -248,7 +249,8 @@ public class ObjectFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register, under the given key, the removal of the given object. * </p>
|
* Register, under the given key, the removal of the given object. *
|
||||||
|
* </p>
|
||||||
* <table border="1">
|
* <table border="1">
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td>Action \ State in Cache</td>
|
* <td>Action \ State in Cache</td>
|
||||||
|
@ -679,6 +681,13 @@ public class ObjectFilter {
|
||||||
return this.cache.size();
|
return this.cache.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the cache is empty, false otherwise
|
||||||
|
*/
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return this.cache.size() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return get a unique transaction ID
|
* @return get a unique transaction ID
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue