Class StrAlgoArgs

  • All Implemented Interfaces:
    CompositeArgument

    public class StrAlgoArgs
    extends Object
    implements CompositeArgument
    Argument list builder for the Redis STRALGO command. Static import the methods from StrAlgoArgs.Builder and call the methods: keys(…) .

    StrAlgoArgs is a mutable object and instances should be used only once to avoid shared mutable state.

    Since:
    6.0
    Author:
    dengliming
    • Constructor Detail

      • StrAlgoArgs

        public StrAlgoArgs()
    • Method Detail

      • minMatchLen

        public StrAlgoArgs minMatchLen​(int minMatchLen)
        restrict the list of matches to the ones of a given minimal length.
        Returns:
        this StrAlgoArgs.
      • justLen

        public StrAlgoArgs justLen()
        Request just the length of the match for results.
        Returns:
        this StrAlgoArgs.
      • withIdx

        public StrAlgoArgs withIdx()
        Request match position in each strings for results.
        Returns:
        this StrAlgoArgs.
      • isWithIdx

        public boolean isWithIdx()
      • build

        public <K,​V> void build​(CommandArgs<K,​V> args)
        Description copied from interface: CompositeArgument
        Build command arguments and contribute arguments to CommandArgs.

        Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.

        Specified by:
        build in interface CompositeArgument
        Type Parameters:
        K - Key type.
        V - Value type.
        Parameters:
        args - the command arguments, must not be null.