mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 15:00:45 +00:00
valueEquals implemented for AS1/2
This commit is contained in:
@@ -168,6 +168,24 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp {
|
||||
return (Objects.equals(operator, other.operator));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final BinaryOpItem other = (BinaryOpItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(leftSide, other.leftSide)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(rightSide, other.rightSide)) {
|
||||
return false;
|
||||
}
|
||||
return GraphTargetItem.objectsValueEquals(operator, other.operator);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public boolean toBoolean() {
|
||||
double val=toNumber();
|
||||
|
||||
@@ -123,6 +123,24 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
Reference in New Issue
Block a user