| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(String key)
Checks whether the given
key is contained in this TypedMapView. |
Object |
get(String key)
Returns the entry that is stored under the given
key. |
boolean |
getBoolean(String key)
Returns the entry that is stored under the given
key as a boolean. |
double |
getDouble(String key)
Returns the entry that is stored under the given
key as a double. |
<T> Map<String,T> |
getEntries(Class<? extends T> entryType)
Returns a
Map of entries (including their key) that are of the given entryType - including
sub-types. |
int |
getInteger(String key)
Returns the entry that is stored under the given
key as an int. |
Set<String> |
getKeys()
Returns an immutable
Set of keys, which are contained in this TypedMapView. |
TypedListView |
getListView(String key)
Returns the entry that is stored under the given
key as a TypedListView. |
TypedMapView |
getMapView(String key)
Returns the entry that is stored under the given
key as a TypedMapView. |
Number |
getNumber(String key)
Returns the entry that is stored under the given
key as a Number. |
String |
getString(String key)
Returns the entry that is stored under the given
key as a String. |
static TypedMapView |
of(ServiceBinding serviceBinding)
Initializes a new
TypedMapView instance from the given serviceBinding. |
static TypedMapView |
ofCredentials(ServiceBinding serviceBinding)
Initializes a new
TypedMapView instance from the ServiceBinding.getCredentials() of the given
serviceBinding. |
@Nonnull public static TypedMapView of(@Nonnull ServiceBinding serviceBinding)
TypedMapView instance from the given serviceBinding.serviceBinding - The ServiceBinding, which should be converted.TypedMapView instance.@Nonnull public static TypedMapView ofCredentials(@Nonnull ServiceBinding serviceBinding)
TypedMapView instance from the ServiceBinding.getCredentials() of the given
serviceBinding.serviceBinding - The ServiceBinding to take the credentials from.TypedMapView instance.@Nonnull public Set<String> getKeys()
Set of keys, which are contained in this TypedMapView.Set of keys.public boolean getBoolean(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a boolean.key - The key of the entry.key as a boolean.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a boolean.@Nullable public Object get(@Nonnull String key) throws KeyNotFoundException
key.key - The key of the entry.key.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.public boolean containsKey(@Nonnull String key)
key is contained in this TypedMapView.key - The key to check.true if the key is contained, false otherwise.public int getInteger(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as an int.key - The key of the entry.key as an int.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not an int.@Nonnull public Number getNumber(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a Number.key - The key of the entry.key as a Number.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a Number.public double getDouble(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a double.key - The key of the entry.key as a double.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a double.@Nonnull public String getString(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a String.key - The key of the entry.key as a String.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a String.@Nonnull public TypedMapView getMapView(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a TypedMapView.key - The key of the entry.key as a TypedMapView.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a TypedMapView.@Nonnull public TypedListView getListView(@Nonnull String key) throws KeyNotFoundException, ValueCastException
key as a TypedListView.key - The key of the entry.key as a TypedListView.KeyNotFoundException - Thrown if the given key is not contained in this TypedMapView.ValueCastException - Thrown if the entry is not a TypedListView.@Nonnull public <T> Map<String,T> getEntries(@Nonnull Class<? extends T> entryType)
Map of entries (including their key) that are of the given entryType - including
sub-types.T - The entry type.entryType - The Class of the entries that should be returned.Map of all entries (including their keys) contained in this TypedMapView that are of (a
sub-)type of the given entryType.Copyright © 2024. All rights reserved.