public class MaskConfig extends Object
| Constructor and Description |
|---|
MaskConfig()
Default constructor; when no masking char is provided, defaults to '*'.
|
MaskConfig(String maskingChar)
Builds a masking configuration with the provided masking character.
|
MaskConfig(String maskingChar,
String[] charsToIgnore)
Builds a masking configuration with the provided masking character and characters to ignore.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getCharsToIgnore()
Returns the characters to ignore during masking.
|
String |
getMaskingChar()
Returns the masking character.
|
int |
getNumCharsToLeaveUnmasked()
Returns the number of characters to leave unmasked, defaults to 0.
|
boolean |
isMaskLeftToRight()
Returns true if masking should be applied left-to-right, false otherwise.
|
void |
setCharsToIgnore(String[] charsToIgnore)
Sets the characters to ignore during masking.
|
void |
setMaskingChar(String maskingChar)
Sets the masking character.
|
void |
setMaskLeftToRight(boolean maskLeftToRight)
Sets whether masking should be applied left-to-right.
|
void |
setNumCharsToLeaveUnmasked(int numCharsToLeaveUnmasked)
Sets the number of characters to leave unmasked.
|
String |
toString() |
public MaskConfig()
public MaskConfig(String maskingChar)
maskingChar - the masking character; this character may be a multi-byte character, but it must be
exactly one codepoint.public MaskConfig(String maskingChar, String[] charsToIgnore)
maskingChar - the masking character; this character may be a multi-byte character, but it must be
exactly one codepoint.charsToIgnore - the set of characters to leave unmasked when the finding is returned. These characters may
be multi-byte characters, but each entry in the array must be exactly one codepoint.public String getMaskingChar()
public void setMaskingChar(String maskingChar)
maskingChar - the masking characterpublic String[] getCharsToIgnore()
public void setCharsToIgnore(String[] charsToIgnore)
charsToIgnore - the characters to ignore during maskingpublic int getNumCharsToLeaveUnmasked()
public void setNumCharsToLeaveUnmasked(int numCharsToLeaveUnmasked)
numCharsToLeaveUnmasked - the number of characters to leave unmaskedpublic boolean isMaskLeftToRight()
public void setMaskLeftToRight(boolean maskLeftToRight)
maskLeftToRight - true if masking should be applied left-to-right, false otherwiseCopyright © 2022. All rights reserved.