Module lettuce.core

Class StrAlgoArgs

java.lang.Object
io.lettuce.core.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 Details

    • StrAlgoArgs

      public StrAlgoArgs()
  • Method Details

    • 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.
    • withMatchLen

      public StrAlgoArgs withMatchLen()
      Request match len for results.
      Returns:
      this StrAlgoArgs.
    • withIdx

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

      public StrAlgoArgs by​(StrAlgoArgs.By by, String... keys)
    • isWithIdx

      public boolean isWithIdx()
    • charset

      public StrAlgoArgs charset​(Charset charset)
    • 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.