class StageImpl<T> implements Stage<T> {

    private final TableIdentifier<T> identifier;
    private final List<Predicate<? super T>> predicates;
    private final JoinType joinType;
    private final HasComparableOperators<T, ?> field;
    private final JoinOperator joinOperator;
    private final HasComparableOperators<?, ?> foreignFirstField;
    private final int referencedStage;
//    private final HasComparableOperators<?, ?> foreignSecondField;
//    private final Inclusion foreignInclusion;

    public StageImpl(
        final TableIdentifier<T> identifier,
        final List<Predicate<? super T>> predicates,
        final JoinType joinType,
        final HasComparableOperators<T, ?> field,
        final JoinOperator joinOperator,
        final HasComparableOperators<?, ?> foreignField,
        final int referencedStage
//        final HasComparableOperators<?, ?> foreignSecondField,
//        final Inclusion foreignInclusion
    ) {
        this.identifier = requireNonNull(identifier);
        this.predicates = predicates; // Nullable
        this.joinType = joinType; // Nullable
        this.field = field; // Nullable
        this.joinOperator = joinOperator; // Nullable
        this.foreignFirstField = foreignField; // Nullable
        this.referencedStage = referencedStage;
//        this.foreignSecondField = foreignSecondField; // Nullable
//        this.foreignInclusion = foreignInclusion; // Nullable
    }

    @Override
    public TableIdentifier<T> identifier() {
        return identifier;
    }

    @Override
    public List<Predicate<? super T>> predicates() {
        return Collections.unmodifiableList(predicates);
    }

    @Override
    public Optional<JoinType> joinType() {
        return Optional.ofNullable(joinType);
    }

    @Override
    public Optional<HasComparableOperators<T, ?>> field() {
        return Optional.ofNullable(field);
    }

    @Override
    public Optional<JoinOperator> joinOperator() {
        return Optional.ofNullable(joinOperator);
    }

    @Override
    public Optional<HasComparableOperators<?, ?>> foreignField() {
        return Optional.ofNullable(foreignFirstField);
    }

    @Override
    public int referencedStage() {
        return referencedStage;
    }

    //    @Override
//    public Optional<HasComparableOperators<?, ?>> foreignSecondField() {
//        return Optional.ofNullable(foreignSecondField);
//    }
//
//    @Override
//    public Optional<Inclusion> foreignInclusion() {
//        return Optional.ofNullable(foreignInclusion);
//    }

    @Override
    public String toString() {<FILL_FUNCTION_BODY>}
}

        return "StageImpl{" +
            "identifier=" + identifier +
            ", predicates=" + predicates +
            ", joinType=" + joinType +
            ", field=" + field +
            ", joinOperator=" + joinOperator +
            ", foreignFirstField=" + foreignFirstField +
            ", referencedStage=" + referencedStage +
            '}';
    
<no_super_class>