V - The map value type.public static final class MapObfuscator.StringKeyedBuilder<V> extends Object
MapObfuscators that use String keys.| Modifier and Type | Method and Description |
|---|---|
MapObfuscator<String,V> |
build()
Creates a new map obfuscator with the current settings of this builder.
|
MapObfuscator.StringKeyedBuilder<V> |
caseInsensitiveByDefault()
Sets the default case sensitivity for new keys to
CaseSensitivity.CASE_INSENSITIVE. |
MapObfuscator.StringKeyedBuilder<V> |
caseSensitiveByDefault()
Sets the default case sensitivity for new keys to
CaseSensitivity.CASE_SENSITIVE. |
<R> R |
transform(Function<? super MapObfuscator.StringKeyedBuilder<V>,? extends R> f)
This method allows the application of a function to this builder.
|
MapObfuscator.StringKeyedBuilder<V> |
withDefaultObfuscator(Obfuscator obfuscator)
Sets the default obfuscator to use, for entries that have no specific obfuscator defined.
|
MapObfuscator.StringKeyedBuilder<V> |
withKey(String key,
Obfuscator obfuscator)
Adds a key to obfuscate the value for.
|
MapObfuscator.StringKeyedBuilder<V> |
withKey(String key,
Obfuscator obfuscator,
CaseSensitivity caseSensitivity)
Adds a key to obfuscate the value for.
|
public MapObfuscator.StringKeyedBuilder<V> withKey(String key, Obfuscator obfuscator)
withKey(String, Obfuscator, CaseSensitivity) with the last specified default case sensitivity
using caseSensitiveByDefault() or caseInsensitiveByDefault(). The default is CaseSensitivity.CASE_SENSITIVE.key - The key to obfuscate the value for.obfuscator - The obfuscator to use for obfuscating the value.NullPointerException - If the given key or obfuscator is null.IllegalArgumentException - If the key was already added with the same case sensitivity.public MapObfuscator.StringKeyedBuilder<V> withKey(String key, Obfuscator obfuscator, CaseSensitivity caseSensitivity)
key - The key to obfuscate the value for.obfuscator - The obfuscator to use for obfuscating the value.caseSensitivity - The case sensitivity for the key.NullPointerException - If the given key, obfuscator or case sensitivity is null.IllegalArgumentException - If the key was already added with the same case sensitivity.public MapObfuscator.StringKeyedBuilder<V> caseSensitiveByDefault()
CaseSensitivity.CASE_SENSITIVE. This is the default setting.
Note that this will not change the case sensitivity of any key that was already added.
public MapObfuscator.StringKeyedBuilder<V> caseInsensitiveByDefault()
CaseSensitivity.CASE_INSENSITIVE.
Note that this will not change the case sensitivity of any key that was already added.
public MapObfuscator.StringKeyedBuilder<V> withDefaultObfuscator(Obfuscator obfuscator)
null.obfuscator - The default obfuscator to use. Use null to only obfuscate specific entries.public <R> R transform(Function<? super MapObfuscator.StringKeyedBuilder<V>,? extends R> f)
Any exception thrown by the function will be propagated to the caller.
R - The type of the result of the function.f - The function to apply.public MapObfuscator<String,V> build()
Copyright © 2020–2023. All rights reserved.