Dieser Commit ist enthalten in:
Ursprung
cef0111fdf
Commit
3465956c4f
@ -38,6 +38,12 @@ public class EqualOperator implements Operator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Value operate(Value value, Value value2) {
|
public Value operate(Value value, Value value2) {
|
||||||
|
if (value instanceof Value.DoubleValue && value2 instanceof Value.LongValue) {
|
||||||
|
return new Value.BooleanValue(value.asDouble() == value2.asDouble());
|
||||||
|
}
|
||||||
|
if (value instanceof Value.LongValue && value2 instanceof Value.DoubleValue) {
|
||||||
|
return new Value.BooleanValue(value.asDouble() == value2.asDouble());
|
||||||
|
}
|
||||||
if (!value.type().equals(value2.type())) {
|
if (!value.type().equals(value2.type())) {
|
||||||
return new Value.BooleanValue(false);
|
return new Value.BooleanValue(false);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,12 @@ public class NotEqualOperator implements Operator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Value operate(Value value, Value value2) {
|
public Value operate(Value value, Value value2) {
|
||||||
|
if (value instanceof Value.DoubleValue && value2 instanceof Value.LongValue) {
|
||||||
|
return new Value.BooleanValue(value.asDouble() != value2.asDouble());
|
||||||
|
}
|
||||||
|
if (value instanceof Value.LongValue && value2 instanceof Value.DoubleValue) {
|
||||||
|
return new Value.BooleanValue(value.asDouble() != value2.asDouble());
|
||||||
|
}
|
||||||
if (!value.type().equals(value2.type())) {
|
if (!value.type().equals(value2.type())) {
|
||||||
return new Value.BooleanValue(false);
|
return new Value.BooleanValue(false);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren