@PublicEvolving public final class ConstantArgumentCount extends Object implements ArgumentCount
ArgumentCount with constant boundaries.
Note: All boundaries of this class are inclusive. All indices are 0-based.
| Modifier and Type | Method and Description |
|---|---|
static ConstantArgumentCount |
any() |
static ConstantArgumentCount |
between(int minCount,
int maxCount) |
boolean |
equals(Object o) |
static ConstantArgumentCount |
from(int minCount) |
Optional<Integer> |
getMaxCount()
Returns the maximum number of argument (inclusive) that a function can take.
|
Optional<Integer> |
getMinCount()
Returns the minimum number of argument (inclusive) that a function can take.
|
int |
hashCode() |
boolean |
isValidCount(int count)
Enables custom validation of argument counts after
ArgumentCount.getMinCount() and ArgumentCount.getMaxCount() have been validated. |
static ConstantArgumentCount |
of(int count) |
static ConstantArgumentCount |
to(int maxCount) |
public static ConstantArgumentCount of(int count)
public static ConstantArgumentCount between(int minCount, int maxCount)
public static ConstantArgumentCount from(int minCount)
public static ConstantArgumentCount to(int maxCount)
public static ConstantArgumentCount any()
public boolean isValidCount(int count)
ArgumentCountArgumentCount.getMinCount() and ArgumentCount.getMaxCount() have been validated.isValidCount in interface ArgumentCountcount - total number of arguments including each argument for a vararg function callpublic Optional<Integer> getMinCount()
ArgumentCountOptional.empty() if such a lower bound is not defined.
getMinCount in interface ArgumentCountpublic Optional<Integer> getMaxCount()
ArgumentCountOptional.empty() if such an upper bound is not defined.
getMaxCount in interface ArgumentCountCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.