Class ConvertedMap<Key,VInner,VOuter>
java.lang.Object
com.comphenix.protocol.wrappers.collection.AbstractConverted<VInner,VOuter>
com.comphenix.protocol.wrappers.collection.ConvertedMap<Key,VInner,VOuter>
- Type Parameters:
VInner- - type of the value in the entries in the inner invisible map.VOuter- - type of the value in the entries publically accessible in the outer map.
- All Implemented Interfaces:
Map<Key,VOuter>
public abstract class ConvertedMap<Key,VInner,VOuter>
extends AbstractConverted<VInner,VOuter>
implements Map<Key,VOuter>
Represents a map that wraps another map by transforming the entries going in and out.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()protected VInnerConvert a value from the outer map to the internal inner map.protected VOuterConvert a value from the inner map to the outer visible map.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 java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ConvertedMap
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<Key,VInner>
-
containsValue
- Specified by:
containsValuein interfaceMap<Key,VInner>
-
entrySet
-
toOuter
Convert a value from the inner map to the outer visible map.- Parameters:
key- - unused value.inner- - the inner value.- Returns:
- The outer value.
-
toInner
Convert a value from the outer map to the internal inner map.- Parameters:
key- - unused value.outer- - the outer value.- Returns:
- The inner value.
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
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).
-