public class OptionalTypesMap<K,V>
extends com.google.common.collect.ForwardingMap<K,V>
This simply delegates all other calls to a HashMap
Created by mackaiver on 10/11/16.
Constructor and Description |
---|
OptionalTypesMap() |
Modifier and Type | Method and Description |
---|---|
protected Map<K,V> |
delegate() |
Optional<Boolean> |
getBoolean(K key)
Get the value for the given key as boolean if it exists and the value can be cast to boolean.
|
Optional<boolean[]> |
getBooleanArray(K key)
Get the value for the given key as boolean array if it exists and the value can be cast to boolean[].
|
Optional<Double> |
getDouble(K key)
Get the value for the given key if it exists and the value can be cast to Double.
|
Optional<double[]> |
getDoubleArray(K key)
Get the value for the given key if it exists and the value can be cast to double[].
|
Optional<Float> |
getFloat(K key)
Get the value for the given key if it exists and the value can be cast to Float.
|
Optional<float[]> |
getFloatArray(K key)
Get the value for the given key if it exists and the value can be cast to float[].
|
Optional<Integer> |
getInt(K key)
Get the value for the given key if it exists and the value can be cast to Integer.
|
Optional<int[]> |
getIntArray(K key)
Get the value for the given key if it exists and the value can be cast to int[].
|
Optional<Long> |
getLong(K key)
Get the value for the given key as long if it exists and the value can be cast to Long.
|
Optional<long[]> |
getLongArray(K key)
Get the value for the given key as long array if it exists and the value can be cast to long[].
|
Optional<Short> |
getShort(K key)
Get the value for the given key if it exists and the value can be cast to Short.
|
Optional<short[]> |
getShortArray(K key)
Get the value for the given key if it exists and the value can be cast to short[].
|
Optional<String> |
getString(K key) |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public Optional<Short> getShort(K key)
public Optional<short[]> getShortArray(K key)
public Optional<Integer> getInt(K key)
public Optional<int[]> getIntArray(K key)
public Optional<Double> getDouble(K key)
public Optional<double[]> getDoubleArray(K key)
public Optional<Float> getFloat(K key)
public Optional<float[]> getFloatArray(K key)
public Optional<Long> getLong(K key)
public Optional<long[]> getLongArray(K key)
public Optional<Boolean> getBoolean(K key)
public Optional<boolean[]> getBooleanArray(K key)
Copyright © 2019. All rights reserved.