Package it.unimi.dsi.fastutil.objects
Class Reference2ByteMaps.EmptyMap<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractReference2ByteFunction<K>
it.unimi.dsi.fastutil.objects.Reference2ByteFunctions.EmptyFunction<K>
it.unimi.dsi.fastutil.objects.Reference2ByteMaps.EmptyMap<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,java.lang.Byte>,Reference2ByteFunction<K>,Reference2ByteMap<K>,java.io.Serializable,java.lang.Cloneable,java.util.function.Function<K,java.lang.Byte>,java.util.function.ToIntFunction<K>,java.util.Map<K,java.lang.Byte>
- Direct Known Subclasses:
Reference2ByteSortedMaps.EmptySortedMap
- Enclosing class:
- Reference2ByteMaps
public static class Reference2ByteMaps.EmptyMap<K> extends Reference2ByteFunctions.EmptyFunction<K> implements Reference2ByteMap<K>, java.io.Serializable, java.lang.Cloneable
An immutable class representing an empty type-specific map.
This class may be useful to implement your own in case you subclass a type-specific map.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.objects.Reference2ByteMap
Reference2ByteMap.Entry<K>, Reference2ByteMap.FastEntrySet<K> -
Method Summary
Modifier and Type Method Description java.lang.Objectclone()booleancontainsValue(byte v)Returnstrueif this map maps one or more keys to the specified value.booleancontainsValue(java.lang.Object ov)Deprecated.Please use the corresponding type-specific method instead.booleanequals(java.lang.Object o)voidforEach(java.util.function.BiConsumer<? super K,? super java.lang.Byte> consumer)bytegetOrDefault(java.lang.Object key, byte defaultValue)Returns the value associated by this function to the specified key, or give the specified value if not present.java.lang.BytegetOrDefault(java.lang.Object key, java.lang.Byte defaultValue)Deprecated.inthashCode()booleanisEmpty()ReferenceSet<K>keySet()voidputAll(java.util.Map<? extends K,? extends java.lang.Byte> m)it.unimi.dsi.fastutil.objects.ObjectSet<Reference2ByteMap.Entry<K>>reference2ByteEntrySet()Returns a type-specific set view of the mappings contained in this map.java.lang.StringtoString()ByteCollectionvalues()Methods inherited from class it.unimi.dsi.fastutil.objects.Reference2ByteFunctions.EmptyFunction
clear, containsKey, defaultReturnValue, defaultReturnValue, getByte, sizeMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.Function
applyMethods inherited from interface java.util.function.Function
composeMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, replaceAllMethods inherited from interface it.unimi.dsi.fastutil.objects.Reference2ByteFunction
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsInt, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, getByte, put, removeByteMethods inherited from interface it.unimi.dsi.fastutil.objects.Reference2ByteMap
clear, computeByte, computeByteIfAbsent, computeByteIfAbsentPartial, computeByteIfPresent, computeIfAbsent, computeIfAbsent, containsKey, defaultReturnValue, defaultReturnValue, entrySet, get, merge, merge, mergeByte, mergeByte, mergeByte, put, putIfAbsent, putIfAbsent, remove, remove, remove, replace, replace, replace, replace, size
-
Method Details
-
containsValue
public boolean containsValue(byte v)Description copied from interface:Reference2ByteMapReturnstrueif this map maps one or more keys to the specified value.- Specified by:
containsValuein interfaceReference2ByteMap<K>- See Also:
Map.containsValue(Object)
-
getOrDefault
@Deprecated public java.lang.Byte getOrDefault(java.lang.Object key, java.lang.Byte defaultValue)Deprecated.Description copied from interface:Reference2ByteMapThis default implementation just delegates to the corresponding
Mapmethod.- Specified by:
getOrDefaultin interfaceit.unimi.dsi.fastutil.Function<K,java.lang.Byte>- Specified by:
getOrDefaultin interfacejava.util.Map<K,java.lang.Byte>- Specified by:
getOrDefaultin interfaceReference2ByteFunction<K>- Specified by:
getOrDefaultin interfaceReference2ByteMap<K>
-
getOrDefault
public byte getOrDefault(java.lang.Object key, byte defaultValue)Description copied from interface:Reference2ByteFunctionReturns the value associated by this function to the specified key, or give the specified value if not present.- Specified by:
getOrDefaultin interfaceReference2ByteFunction<K>- Specified by:
getOrDefaultin interfaceReference2ByteMap<K>- Overrides:
getOrDefaultin classReference2ByteFunctions.EmptyFunction<K>- Parameters:
key- the key.defaultValue- the value to return if not present.- Returns:
- the corresponding value, or
defaultValueif no value was present for the given key. - See Also:
Function.getOrDefault(Object, Object)
-
containsValue
@Deprecated public boolean containsValue(java.lang.Object ov)Deprecated.Please use the corresponding type-specific method instead.- Specified by:
containsValuein interfacejava.util.Map<K,java.lang.Byte>- Specified by:
containsValuein interfaceReference2ByteMap<K>
-
putAll
- Specified by:
putAllin interfacejava.util.Map<K,java.lang.Byte>
-
reference2ByteEntrySet
Description copied from interface:Reference2ByteMapReturns a type-specific set view of the mappings contained in this map.This method is necessary because there is no inheritance along type parameters: it is thus impossible to strengthen
Map.entrySet()so that it returns anObjectSetof type-specific entries (the latter makes it possible to access keys and values with type-specific methods).- Specified by:
reference2ByteEntrySetin interfaceReference2ByteMap<K>- Returns:
- a type-specific set view of the mappings contained in this map.
- See Also:
Map.entrySet()
-
keySet
Description copied from interface:Reference2ByteMap- Specified by:
keySetin interfacejava.util.Map<K,java.lang.Byte>- Specified by:
keySetin interfaceReference2ByteMap<K>- Returns:
- a set view of the keys contained in this map.
- See Also:
Map.keySet()
-
values
Description copied from interface:Reference2ByteMap- Specified by:
valuesin interfacejava.util.Map<K,java.lang.Byte>- Specified by:
valuesin interfaceReference2ByteMap<K>- Returns:
- a set view of the values contained in this map.
- See Also:
Map.values()
-
forEach
- Specified by:
forEachin interfacejava.util.Map<K,java.lang.Byte>- Specified by:
forEachin interfaceReference2ByteMap<K>
-
clone
public java.lang.Object clone()- Overrides:
clonein classReference2ByteFunctions.EmptyFunction<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacejava.util.Map<K,java.lang.Byte>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacejava.util.Map<K,java.lang.Byte>- Overrides:
hashCodein classReference2ByteFunctions.EmptyFunction<K>
-
equals
public boolean equals(java.lang.Object o)- Specified by:
equalsin interfacejava.util.Map<K,java.lang.Byte>- Overrides:
equalsin classReference2ByteFunctions.EmptyFunction<K>
-
toString
public java.lang.String toString()- Overrides:
toStringin classReference2ByteFunctions.EmptyFunction<K>
-