Class Currencies
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<String,String>
net.thauvin.erik.frankfurter.models.Currencies
- All Implemented Interfaces:
Serializable
,ConcurrentMap<String,
,String> Map<String,
String>
Represents a map of available currency symbols to their full names.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,
V extends Object> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFullNameFor
(String symbol) Retrieves the full name of a currency by its symbol.getSymbolFor
(String name) Retrieves the currency symbol corresponding to the given currency name.getSymbolFor
(Pattern regexPattern) Retrieves the currency symbol corresponding to a currency name that matches the given regular expression pattern.Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
Methods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
Currencies
public Currencies()
-
-
Method Details
-
getFullNameFor
Retrieves the full name of a currency by its symbol.- Parameters:
symbol
- The currency symbol- Returns:
- The full name of the currency, or null if the symbol doesn't exist
-
getSymbolFor
Retrieves the currency symbol corresponding to the given currency name.- Parameters:
name
- The full name of the currency for which the symbol is to be retrieved- Returns:
- The symbol of the currency if the name matches an entry, or null if no match is found
-
getSymbolFor
Retrieves the currency symbol corresponding to a currency name that matches the given regular expression pattern.- Parameters:
regexPattern
- The pattern used to match currency names- Returns:
- The symbol of the currency if a matching name is found, or null if no match is found or if the pattern is null.
-