class GetWalks implements
        InputOutput<Iterable<? extends EntityId>, Iterable<Walk>>,
        MultiEntityIdInput,
        Operations<OperationChain<Iterable<Element>>> {

    @Override
    public ValidationResult validate() {
        final ValidationResult result = InputOutput.super.validate();

        final int getEdgeOperations = getNumberOfGetEdgeOperations();

        if (getEdgeOperations < 1) {
            result.addError("No hops were provided. " + HOP_DEFINITION);
        } else {
            int i = 0;
            for (final OperationChain<Iterable<Element>> operation : operations) {
                if (operation.getOperations().isEmpty()) {
                    result.addError("Operation chain " + i + " contains no operations");
                } else {
                    final Operation firstOp = operation.getOperations().get(0);
                    if (firstOp instanceof Input) {
                        if (null != ((Input) firstOp).getInput()) {
                            result.addError("The input for operations must be null.");
                        }
                    } else {
                        result.addError("The first operation in operation chain " + i + ": " + firstOp.getClass().getName() + " is not be able to accept the input seeds. It must implement " + Input.class.getName());
                    }
                }

                if (getNumberOfGetEdgeOperationsWithoutRepeats(operation) < 1 && i < (operations.size() - 1)) {
                    // An operation does not contain a hop
                    result.addError("All operations must contain a single hop. Operation " + i + " does not contain a hop. The only exception is the last operation, which is allowed to just fetch Entities. " + HOP_DEFINITION);
                } else if (getNumberOfGetEdgeOperationsWithoutRepeats(operation) > 1) {
                    // An operation does not contain a hop
                    result.addError("All operations must contain a single hop. Operation " + i + " contains multiple hops.");
                }

                i++;
            }
        }

        return result;
    }

}