質問

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