Class UserAgentManager.UserAgentCollection
java.lang.Object
java.util.AbstractMap<String,LinkedHashMap<String,String>>
java.util.HashMap<String,LinkedHashMap<String,String>>
java.util.LinkedHashMap<String,LinkedHashMap<String,String>>
page.codeberg.friedolyn.configuration.client.UserAgentManager.UserAgentCollection
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,LinkedHashMap<String, String>> SequencedMap<String,
LinkedHashMap<String, String>>
- Enclosing class:
UserAgentManager
public static class UserAgentManager.UserAgentCollection
extends LinkedHashMap<String,LinkedHashMap<String,String>>
A
HashMap
in the form of <client, <platform, user-agent>>
that contains the user agents for
various clients on different platforms.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull UserAgentManager.UserAgentCollection
Converts a given JSON string to aUserAgentManager.UserAgentCollection
object.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
UserAgentCollection
public UserAgentCollection()
-
-
Method Details
-
fromJson
@NonNull public static @NonNull UserAgentManager.UserAgentCollection fromJson(@NonNull @NonNull String json) throws IllegalArgumentException, com.fasterxml.jackson.core.JsonProcessingException Converts a given JSON string to aUserAgentManager.UserAgentCollection
object. The JSON string is validated againstUserAgentManager.userAgentsSchema
if it is notnull
.- Parameters:
json
- The JSON string to convert to aUserAgentManager.UserAgentCollection
object.- Returns:
- The
UserAgentManager.UserAgentCollection
object that was created from the JSON string. - Throws:
IllegalArgumentException
- If the JSON does not match the schema or lacks any of the clients inUserAgentManager.Client
.com.fasterxml.jackson.core.JsonProcessingException
- If the JSON could not be processed.
-