public static void assertEqualInputs()

in wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/wayangplan/Operators.java [93:107]


    public static void assertEqualInputs(Operator o1, Operator o2) throws IllegalArgumentException {
        if (o1.getNumInputs() != o2.getNumInputs()) {
            throw new IllegalArgumentException(String.format("%s and %s have different numbers of inputs.", o1, o2));
        }

        for (int i = 0; i < o1.getNumInputs(); i++) {
            final InputSlot<?> input1 = o1.getInput(i);
            final InputSlot<?> input2 = o2.getInput(i);
            if ((input1 == null && input2 != null) ||
                    (input1 != null && input2 == null) ||
                    (input1 != null && input2 != null && !input1.getType().equals(input2.getType()))) {
                throw new IllegalArgumentException("Operators differ in input " + i + ".");
            }
        }
    }