Refactored and reformatted code to use less static variables

This commit is contained in:
CrushedPixel
2015-04-23 14:09:54 +02:00
parent f22416be2c
commit 0003f040ed
109 changed files with 9037 additions and 10229 deletions

View File

@@ -1,16 +1,16 @@
package eu.crushedpixel.replaymod.holders;
import java.util.Comparator;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import java.util.Comparator;
public class KeyframeComparator implements Comparator<Keyframe> {
@Override
public int compare(Keyframe o1, Keyframe o2) {
if(ReplayHandler.isSelected(o1)) return 1;
if(ReplayHandler.isSelected(o2)) return -1;
return ((Integer)o1.getRealTimestamp()).compareTo(o2.getRealTimestamp());
}
@Override
public int compare(Keyframe o1, Keyframe o2) {
if(ReplayHandler.isSelected(o1)) return 1;
if(ReplayHandler.isSelected(o2)) return -1;
return ((Integer) o1.getRealTimestamp()).compareTo(o2.getRealTimestamp());
}
}