@Experimental public class ArgrepParams extends java.lang.Object implements IParams
ARGREP command. Every instance carries the mandatory start end
bounds of the search range; instances are obtained through one of the static factories
(unbounded(), range(long, long), from(long), to(long)) and
may be flipped with reversed() to traverse in descending index order. Predicates,
combinator (AND/OR), LIMIT and NOCASE are appended via fluent
setters in the order required by the wire protocol. The WITHVALUES flag is not exposed
here: use argrepWithValues to request index/value pairs.| Modifier and Type | Method and Description |
|---|---|
void |
addParams(CommandArguments args) |
ArgrepParams |
and()
Combine multiple predicates with logical AND.
|
boolean |
equals(java.lang.Object o) |
ArgrepParams |
exact(byte[] value)
Add an
EXACT predicate: matches elements whose value equals the given bytes exactly. |
ArgrepParams |
exact(java.lang.String value)
Add an
EXACT predicate: matches elements whose value equals the given string exactly. |
static ArgrepParams |
from(long start)
Search from a concrete start index to the end of the array (wire end
+). |
ArgrepParams |
glob(byte[] pattern)
Add a
GLOB predicate: matches elements against a glob-style pattern (supports
*, ? |
ArgrepParams |
glob(java.lang.String pattern)
Add a
GLOB predicate: matches elements against a glob-style pattern (supports
*, ? |
int |
hashCode() |
ArgrepParams |
limit(long limit)
Cap the number of matches returned.
|
ArgrepParams |
match(byte[] value)
Add a
MATCH predicate: matches elements that contain the given bytes as a substring. |
ArgrepParams |
match(java.lang.String value)
Add a
MATCH predicate: matches elements that contain the given string as a substring. |
ArgrepParams |
nocase()
Perform all predicate comparisons case-insensitively.
|
ArgrepParams |
or()
|
static ArgrepParams |
range(long start,
long end)
Search the inclusive index range
[start, end]. |
ArgrepParams |
re(byte[] pattern)
Add a
RE predicate: matches elements against a regular expression. |
ArgrepParams |
re(java.lang.String pattern)
Add a
RE predicate: matches elements against a regular expression. |
ArgrepParams |
reversed()
Swap the start and end bounds.
|
static ArgrepParams |
to(long end)
Search from the start of the array to a concrete end index (wire start
-). |
static ArgrepParams |
unbounded()
Search the entire array (wire bounds
- +). |
public static ArgrepParams unbounded()
- +).ArgrepParams with start=-, end=+public static ArgrepParams range(long start, long end)
[start, end].start - the zero-based start index (inclusive)end - the zero-based end index (inclusive)ArgrepParams with concrete numeric boundspublic static ArgrepParams from(long start)
+).start - the zero-based start index (inclusive)ArgrepParams with start=numeric, end=+public static ArgrepParams to(long end)
-).end - the zero-based end index (inclusive)ArgrepParams with start=-, end=numericpublic ArgrepParams reversed()
start > end as a
descending traversal, this returns matches in reverse index order.ArgrepParamspublic ArgrepParams exact(java.lang.String value)
EXACT predicate: matches elements whose value equals the given string exactly.value - the literal value to match againstArgrepParamspublic ArgrepParams exact(byte[] value)
EXACT predicate: matches elements whose value equals the given bytes exactly.value - the literal value to match againstArgrepParamspublic ArgrepParams match(java.lang.String value)
MATCH predicate: matches elements that contain the given string as a substring.value - the substring to search forArgrepParamspublic ArgrepParams match(byte[] value)
MATCH predicate: matches elements that contain the given bytes as a substring.value - the substring to search forArgrepParamspublic ArgrepParams glob(java.lang.String pattern)
GLOB predicate: matches elements against a glob-style pattern (supports
*, ? and [...]).pattern - the glob patternArgrepParamspublic ArgrepParams glob(byte[] pattern)
GLOB predicate: matches elements against a glob-style pattern (supports
*, ? and [...]).pattern - the glob pattern as raw bytesArgrepParamspublic ArgrepParams re(java.lang.String pattern)
RE predicate: matches elements against a regular expression.pattern - the regular expressionArgrepParamspublic ArgrepParams re(byte[] pattern)
RE predicate: matches elements against a regular expression.pattern - the regular expression as raw bytesArgrepParamspublic ArgrepParams and()
ArgrepParamspublic ArgrepParams or()
ArgrepParamspublic ArgrepParams limit(long limit)
limit - the maximum number of matches to returnArgrepParamspublic ArgrepParams nocase()
ArgrepParamspublic void addParams(CommandArguments args)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2026. All rights reserved.