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.UserAgentCollectionConverts a given JSON string to aUserAgentManager.UserAgentCollectionobject.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods 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.UserAgentCollectionobject. The JSON string is validated againstUserAgentManager.userAgentsSchemaif it is notnull.- Parameters:
json- The JSON string to convert to aUserAgentManager.UserAgentCollectionobject.- Returns:
- The
UserAgentManager.UserAgentCollectionobject 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.
-