Package io.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 fromStrAlgoArgs.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StrAlgoArgs.Builder
Builder entry points forStrAlgoArgs
.static class
StrAlgoArgs.By
-
Constructor Summary
Constructors Constructor Description StrAlgoArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.StrAlgoArgs
by(StrAlgoArgs.By by, String... keys)
StrAlgoArgs
charset(Charset charset)
boolean
isWithIdx()
StrAlgoArgs
justLen()
Request just the length of the match for results.StrAlgoArgs
minMatchLen(int minMatchLen)
restrict the list of matches to the ones of a given minimal length.StrAlgoArgs
withIdx()
Request match position in each strings for results.StrAlgoArgs
withMatchLen()
Request match len for results.
-
-
-
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
.
-
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 toCommandArgs
.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 interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-