Class ConvertedMultimap<Key,VInner,VOuter>
java.lang.Object
com.comphenix.protocol.wrappers.collection.AbstractConverted<VInner,VOuter>
com.comphenix.protocol.wrappers.collection.ConvertedMultimap<Key,VInner,VOuter>
- Type Parameters:
Key- - the key.VInner- - the inner value type.VOuter- - the outer value type.
- All Implemented Interfaces:
com.google.common.collect.Multimap<Key,VOuter>
public abstract class ConvertedMultimap<Key,VInner,VOuter>
extends AbstractConverted<VInner,VOuter>
implements com.google.common.collect.Multimap<Key,VOuter>
Represents a multimap that wraps another multimap by transforming the entries that are going in and out.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()voidclear()booleancontainsEntry(Object key, Object value) booleancontainsKey(Object key) booleancontainsValue(Object value) entries()booleanisEmpty()com.google.common.collect.Multiset<Key> keys()keySet()booleanbooleanbooleanbooleanreplaceValues(Key key, Iterable<? extends VOuter> values) intsize()protected Collection<VInner> toInnerCollection(Collection<VOuter> outer) Wrap a given collection.protected ObjecttoInnerObject(Object outer) Convert to an inner object if its of the correct type, otherwise leave it.protected Collection<VOuter> toOuterCollection(Collection<VInner> inner) Wrap a given collection.toString()Returns a string representation of this map.values()Methods inherited from class com.comphenix.protocol.wrappers.collection.AbstractConverted
getInnerConverter, getOuterConverter, toInner, toOuterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.common.collect.Multimap
equals, forEach, hashCode
-
Constructor Details
-
ConvertedMultimap
-
-
Method Details
-
toOuterCollection
Wrap a given collection.- Parameters:
inner- - the inner collection.- Returns:
- The outer collection.
-
toInnerCollection
Wrap a given collection.- Parameters:
outer- - the outer collection.- Returns:
- The inner collection.
-
toInnerObject
Convert to an inner object if its of the correct type, otherwise leave it.- Parameters:
outer- - the outer object.- Returns:
- The inner object, or the same object.
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
-
containsValue
-
containsEntry
-
put
-
remove
-
putAll
-
putAll
-
replaceValues
-
removeAll
-
clear
public void clear() -
get
-
keySet
-
keys
-
values
-
entries
-
asMap
-
toString
Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map'sentrySetview's iterator, enclosed in braces ("{}"). Adjacent mappings are separated by the characters", "(comma and space). Each key-value mapping is rendered as the key followed by an equals sign ("=") followed by the associated value. Keys and values are converted to strings as byString.valueOf(Object).
-