class InputDependencyConstraintChecker {

	public boolean check(final SchedulingExecutionVertex schedulingExecutionVertex) {
		if (Iterables.isEmpty(schedulingExecutionVertex.getConsumedResults())) {
			return true;
		}

		final InputDependencyConstraint inputConstraint = schedulingExecutionVertex.getInputDependencyConstraint();
		switch (inputConstraint) {
			case ANY:
				return checkAny(schedulingExecutionVertex);
			case ALL:
				return checkAll(schedulingExecutionVertex);
			default:
				throw new IllegalStateException("Unknown InputDependencyConstraint " + inputConstraint);
		}
	}

}