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 forArgumentCount
with 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 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 afterArgumentCount.getMinCount()
andArgumentCount.getMaxCount()
have been validated.static ConstantArgumentCount
of(int count)
static ConstantArgumentCount
to(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:ArgumentCount
Enables custom validation of argument counts afterArgumentCount.getMinCount()
andArgumentCount.getMaxCount()
have been validated.- Specified by:
isValidCount
in interfaceArgumentCount
- Parameters:
count
- total number of arguments including each argument for a vararg function call
-
getMinCount
public Optional<Integer> getMinCount()
Description copied from interface:ArgumentCount
Returns the minimum number of argument (inclusive) that a function can take.Optional.empty()
if such a lower bound is not defined.- Specified by:
getMinCount
in interfaceArgumentCount
-
getMaxCount
public Optional<Integer> getMaxCount()
Description copied from interface:ArgumentCount
Returns the maximum number of argument (inclusive) that a function can take.Optional.empty()
if such an upper bound is not defined.- Specified by:
getMaxCount
in interfaceArgumentCount
-
-