문제

I tried to overload an existing external class's operator with Xtend but it doesn't work. I can't write in the class source, like BigIntegerExtension. How should I do it?

Answer

The answer is pretty simple. We can override any of the operators what we want with operator overload.

// IntVar = IntVar
def static operator_equals(IntVar a, IntVar b) {
    return IntConstraintFactory.arithm(a, "=", b)
}
도움이 되었습니까?

해결책

The answer is pretty simple. We can override any of the operators what we want with operator overload.

// IntVar = IntVar
def static operator_equals(IntVar a, IntVar b) {
    return IntConstraintFactory.arithm(a, "=", b)
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top