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