Class PartialMaskingFunction

  • All Implemented Interfaces:
    AssignmentTestable, Function, ScalarFunction

    public class PartialMaskingFunction
    extends MaskingFunction
    A MaskingFunction applied to a StringType value that, depending on PartialMaskingFunction.Kind:
    • Replaces each character between the supplied positions by the supplied padding character. In other words, it will mask all the characters except the first m and last n.
    • Replaces each character before and after the supplied positions by the supplied padding character. In other words, it will only mask all the first m and last n characters.
    The returned value will allways be of the same type as the first string-based argument.
    • Field Detail

      • DEFAULT_PADDING_CHAR

        public static final char DEFAULT_PADDING_CHAR
        The character to be used as padding if no other character is supplied when calling the function.
        See Also:
        Constant Field Values
    • Method Detail

      • execute

        public java.nio.ByteBuffer execute​(Arguments arguments)
                                    throws InvalidRequestException
        Description copied from interface: ScalarFunction
        Applies this function to the specified arguments.
        Parameters:
        arguments - the input arguments for the function
        Returns:
        the result of applying this function to the arguments
        Throws:
        InvalidRequestException - if this function cannot not be applied to the arguments
      • factories

        public static java.util.Collection<FunctionFactory> factories()
        Returns:
        a collection of function factories to build new PartialMaskingFunction functions.