Interface ArgumentCount
-
- All Known Implementing Classes:
ConstantArgumentCount
@PublicEvolving public interface ArgumentCount
Defines the count of accepted arguments (including open intervals) that a function can take.Note: Implementations should implement
Object.hashCode()
andObject.equals(Object)
.- See Also:
ConstantArgumentCount
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.boolean
isValidCount(int count)
Enables custom validation of argument counts aftergetMinCount()
andgetMaxCount()
have been validated.
-
-
-
Method Detail
-
isValidCount
boolean isValidCount(int count)
Enables custom validation of argument counts aftergetMinCount()
andgetMaxCount()
have been validated.- Parameters:
count
- total number of arguments including each argument for a vararg function call
-
getMinCount
Optional<Integer> getMinCount()
Returns the minimum number of argument (inclusive) that a function can take.Optional.empty()
if such a lower bound is not defined.
-
getMaxCount
Optional<Integer> getMaxCount()
Returns the maximum number of argument (inclusive) that a function can take.Optional.empty()
if such an upper bound is not defined.
-
-