Class ArtifactMultimap
java.lang.Object
com.atlassian.bamboo.v2.build.artifact.ArtifactMultimap
Specialized, non-generic implementation of
Multimap<String,Artifact>
that is safe to be serialized and thus
can be used in CommonContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
Returns a view of the mappings contained in this multimap as a map from each key to its corresponding values.boolean
containsKey
(String key) Returnstrue
if this multimap contains one or more keys to the specified value.copy()
Creates a deep copy of this multimap.static ArtifactMultimap
create()
static ArtifactMultimap
entries()
Returns a collection view of all key-value pairs contained in this multimap.boolean
Retrieves the collection of values associated with the specified key in this multimap.int
hashCode()
inverse()
Creates an inverse view of this multimap.boolean
isEmpty()
Returnstrue
if this multimap contains no key-value mappings.keySet()
Returns the set of keys contained in this multimap.static ArtifactMultimap
void
Associates the specified value with the specified key in this multimap.void
putAll
(String key, Collection<? extends Artifact> values) Associates all of the values in the specified collection with the specified key in this multimap.void
Removes a single instance of the specified value from the multimap, if it is present.void
Removes all the values associated with the specified key in this multimap.int
size()
Returns the total number of key-value pairs in the multimap.values()
Returns a collection view of all values associated with keys in this multimap.
-
Constructor Details
-
ArtifactMultimap
public ArtifactMultimap()
-
-
Method Details
-
create
-
create
-
of
-
put
Description copied from interface:Multimap
Associates the specified value with the specified key in this multimap. If the multimap previously contained a mapping for the key, the new value is added to the collection of values mapped to that key. -
putAll
Description copied from interface:Multimap
Associates all of the values in the specified collection with the specified key in this multimap. If the multimap previously contained mappings for the key, the new values are added to the collection of values mapped to that key. -
get
Description copied from interface:Multimap
Retrieves the collection of values associated with the specified key in this multimap.- Specified by:
get
in interfaceImmutableMultimap<String,
Artifact> - Specified by:
get
in interfaceMultimap<String,
Artifact> - Parameters:
key
- the key whose associated values are to be returned- Returns:
- the collection of values associated with the specified key, or an empty collection if no values are associated with the key
-
remove
Description copied from interface:Multimap
Removes a single instance of the specified value from the multimap, if it is present. -
removeAll
Description copied from interface:Multimap
Removes all the values associated with the specified key in this multimap. -
keySet
Description copied from interface:Multimap
Returns the set of keys contained in this multimap. -
containsKey
Description copied from interface:Multimap
Returnstrue
if this multimap contains one or more keys to the specified value.- Specified by:
containsKey
in interfaceImmutableMultimap<String,
Artifact> - Specified by:
containsKey
in interfaceMultimap<String,
Artifact> - Parameters:
key
- key whose presence in this multimap is to be tested- Returns:
true
if this multimap contains a mapping for the specified key
-
values
Description copied from interface:Multimap
Returns a collection view of all values associated with keys in this multimap. -
copy
Description copied from interface:Multimap
Creates a deep copy of this multimap. -
entries
Description copied from interface:Multimap
Returns a collection view of all key-value pairs contained in this multimap. Each key-value pair is represented as a Map.Entry. If the multimap allows duplicate values, a separate Map.Entry will be included for each duplicate value. -
size
public int size()Description copied from interface:Multimap
Returns the total number of key-value pairs in the multimap. -
isEmpty
public boolean isEmpty()Description copied from interface:Multimap
Returnstrue
if this multimap contains no key-value mappings. -
asMap
Description copied from interface:Multimap
Returns a view of the mappings contained in this multimap as a map from each key to its corresponding values. -
inverse
Description copied from interface:Multimap
Creates an inverse view of this multimap. In the inverse multimap, each value in the original multimap becomes a key in the new multimap, and each key in the original becomes part of the set of values associated with the new key. The inverse multimap is also immutable. -
equals
-
hashCode
public int hashCode()
-