class InputDependencyConstraintChecker {

	public boolean check(final SchedulingExecutionVertex schedulingExecutionVertex) {
		final InputDependencyConstraint inputConstraint = schedulingExecutionVertex.getInputDependencyConstraint();
		if (schedulingExecutionVertex.getConsumedResultPartitions().isEmpty() || ALL.equals(inputConstraint)) {
			return checkAll(schedulingExecutionVertex);
		} else if (ANY.equals(inputConstraint)) {
			return checkAny(schedulingExecutionVertex);
		} else {
			throw new IllegalArgumentException();
		}
	}

}