public class DefaultCollectionsProvider extends Object implements CollectionsProvider
CollectionsProvider
that creates standard JDK collection
class objects.Constructor and Description |
---|
DefaultCollectionsProvider() |
Modifier and Type | Method and Description |
---|---|
<K,V> Map<K,V> |
newIdentityMap()
Creates a map that uses reference-equality in place of object-equality when comparing keys.
|
<K,V> Map<K,V> |
newIdentityMap(int expectedMaxSize)
Creates a map that uses reference-equality in place of object-equality when comparing keys.
|
<K,V> Map<K,V> |
newIdentityMap(Map<K,V> initFrom)
Creates a map that uses reference-equality in place of object-equality when comparing keys.
|
<E> Set<E> |
newIdentitySet()
Creates a set that uses reference-equality in place of object-equality when comparing
entries.
|
public DefaultCollectionsProvider()
public <E> Set<E> newIdentitySet()
CollectionsProvider
newIdentitySet
in interface CollectionsProvider
public <K,V> Map<K,V> newIdentityMap()
CollectionsProvider
newIdentityMap
in interface CollectionsProvider
public <K,V> Map<K,V> newIdentityMap(int expectedMaxSize)
CollectionsProvider
newIdentityMap
in interface CollectionsProvider
expectedMaxSize
- the expected maximum size of the mappublic <K,V> Map<K,V> newIdentityMap(Map<K,V> initFrom)
CollectionsProvider
newIdentityMap
in interface CollectionsProvider
initFrom
- the returned map is populated with the entries in this map