mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 11:51:09 +00:00
hashCode and equals
This commit is contained in:
@@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.types.RGB;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
@@ -41,7 +42,7 @@ public class Frame implements TreeItem, Exportable {
|
||||
|
||||
public RGB backgroundColor = new RGBA(0, 0, 0, 0);
|
||||
|
||||
public Timeline timeline;
|
||||
public final Timeline timeline;
|
||||
|
||||
public List<Integer> sounds = new ArrayList<>();
|
||||
|
||||
@@ -92,7 +93,7 @@ public class Frame implements TreeItem, Exportable {
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Frame) {
|
||||
Frame frameObj = (Frame) obj;
|
||||
return timeline.equals(frameObj.timeline) && frame == frameObj.frame;
|
||||
return Objects.equals(timeline, frameObj.timeline) && frame == frameObj.frame;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.Exportable;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -66,7 +67,7 @@ public class TagScript implements TreeItem, Exportable {
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof TagScript) {
|
||||
return tag.equals(((TagScript) obj).getTag());
|
||||
return Objects.equals(tag, ((TagScript) obj).tag);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user