mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-17 15:35:00 +00:00
Renaming 'values' to 'valuesView' to make it more obvious where it is used and why it can be transient. Rewriting values() to be readable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@655741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d72bf81d8b
commit
b02d2167ed
@ -66,7 +66,7 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap {
|
||||
/** The factory for creating value collections. */
|
||||
private final Factory collectionFactory;
|
||||
/** The cached values. */
|
||||
private transient Collection values;
|
||||
private transient Collection valuesView;
|
||||
|
||||
/**
|
||||
* Creates a map which wraps the given map and
|
||||
@ -253,8 +253,10 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap {
|
||||
* @return a collection view of the values contained in this map
|
||||
*/
|
||||
public Collection values() {
|
||||
Collection vs = values;
|
||||
return (vs != null ? vs : (values = new Values()));
|
||||
if (valuesView == null) {
|
||||
valuesView = new Values();
|
||||
}
|
||||
return valuesView;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user