Fix all warnings
Add and make use of Lombok Remove Mojang API Remove ZipFileUtils Remove StreamTools in favor of Apache IOUtils Keyframe should be abstract all derivatives final Replace clone in Keyframe with copy Move some constants from GuiReplaySetttings to GuiConstants
This commit is contained in:
@@ -1,33 +1,15 @@
|
||||
package eu.crushedpixel.replaymod.holders;
|
||||
|
||||
public class Keyframe {
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor
|
||||
public abstract class Keyframe {
|
||||
|
||||
private int realTimestamp;
|
||||
|
||||
public Keyframe clone() {
|
||||
return new Keyframe(realTimestamp);
|
||||
}
|
||||
|
||||
public Keyframe(int realTimestamp) {
|
||||
this.realTimestamp = realTimestamp;
|
||||
}
|
||||
|
||||
public int getRealTimestamp() {
|
||||
return realTimestamp;
|
||||
}
|
||||
|
||||
public void setRealTimestamp(int realTimestamp) { this.realTimestamp = realTimestamp; }
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o2) {
|
||||
if(o2 == null) return false;
|
||||
if(!(o2 instanceof Keyframe)) return false;
|
||||
Keyframe kf = (Keyframe)o2;
|
||||
return hashCode() == kf.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return realTimestamp;
|
||||
}
|
||||
public abstract Keyframe copy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user