Class ConstantArgumentCount
- java.lang.Object
-
- org.apache.flink.table.types.inference.ConstantArgumentCount
-
- All Implemented Interfaces:
ArgumentCount
@PublicEvolving public final class ConstantArgumentCount extends Object implements ArgumentCount
Helper class forArgumentCountwith constant boundaries.Note: All boundaries of this class are inclusive. All indices are 0-based.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantArgumentCountany()static ConstantArgumentCountbetween(int minCount, int maxCount)booleanequals(Object o)static ConstantArgumentCountfrom(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.inthashCode()booleanisValidCount(int count)Enables custom validation of argument counts afterArgumentCount.getMinCount()andArgumentCount.getMaxCount()have been validated.static ConstantArgumentCountof(int count)static ConstantArgumentCountto(int maxCount)
-
-
-
Method Detail
-
of
public static ConstantArgumentCount of(int count)
-
between
public static ConstantArgumentCount between(int minCount, int maxCount)
-
from
public static ConstantArgumentCount from(int minCount)
-
to
public static ConstantArgumentCount to(int maxCount)
-
any
public static ConstantArgumentCount any()
-
isValidCount
public boolean isValidCount(int count)
Description copied from interface:ArgumentCountEnables custom validation of argument counts afterArgumentCount.getMinCount()andArgumentCount.getMaxCount()have been validated.- Specified by:
isValidCountin interfaceArgumentCount- Parameters:
count- total number of arguments including each argument for a vararg function call
-
getMinCount
public Optional<Integer> getMinCount()
Description copied from interface:ArgumentCountReturns the minimum number of argument (inclusive) that a function can take.Optional.empty()if such a lower bound is not defined.- Specified by:
getMinCountin interfaceArgumentCount
-
getMaxCount
public Optional<Integer> getMaxCount()
Description copied from interface:ArgumentCountReturns the maximum number of argument (inclusive) that a function can take.Optional.empty()if such an upper bound is not defined.- Specified by:
getMaxCountin interfaceArgumentCount
-
-