K - The map key type.V - The map value type.public static final class MapObfuscator.Builder<K,V> extends Object
MapObfuscators.| Modifier and Type | Method and Description |
|---|---|
MapObfuscator<K,V> |
build()
Creates a new map obfuscator with the current settings of this builder.
|
<R> R |
transform(Function<? super MapObfuscator.Builder<K,V>,? extends R> f)
This method allows the application of a function to this builder.
|
MapObfuscator.Builder<K,V> |
withDefaultObfuscator(Obfuscator obfuscator)
Sets the default obfuscator to use, for entries that have no specific obfuscator defined.
|
MapObfuscator.Builder<K,V> |
withKey(K key,
Obfuscator obfuscator)
Adds a key to obfuscate the value for.
|
public MapObfuscator.Builder<K,V> withKey(K key, Obfuscator obfuscator)
key - The key to obfuscate the value for.obfuscator - The obfuscator to use for obfuscating the value.NullPointerException - If the given obfuscator is null.public MapObfuscator.Builder<K,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.Builder<K,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<K,V> build()
Copyright © 2020–2023. All rights reserved.