Lombokize FileRating
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
package eu.crushedpixel.replaymod.api.replay.holders;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FileRating {
|
||||
|
||||
private int file;
|
||||
private boolean rating;
|
||||
|
||||
public int getFileID() {
|
||||
return file;
|
||||
}
|
||||
|
||||
// TODO Will be changed later
|
||||
public boolean getRating() {
|
||||
return rating;
|
||||
}
|
||||
@SerializedName("rating") private boolean ratingPositive;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class RatedFileHandler {
|
||||
rated = new HashMap<Integer, Boolean>();
|
||||
|
||||
for(FileRating fr : ratings) {
|
||||
rated.put(fr.getFileID(), fr.getRating());
|
||||
rated.put(fr.getFile(), fr.isRatingPositive());
|
||||
}
|
||||
|
||||
retrieved = true;
|
||||
|
||||
Reference in New Issue
Block a user