You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.7 KiB
80 lines
2.7 KiB
package objects;
|
|
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* Created by LeJay on 19.02.2017.
|
|
*/
|
|
|
|
public class Stat implements Serializable, Comparable<Stat>{
|
|
|
|
private String name;
|
|
private int code;
|
|
private String team;
|
|
private double valRot;
|
|
private String valSeason;
|
|
private float valRelative;
|
|
private String ValProjection;
|
|
private double rank;
|
|
private double projectedRK;
|
|
private String statVal;
|
|
private String player;
|
|
private String slot;
|
|
private int slotID;
|
|
private int period;
|
|
private float valToRank;
|
|
|
|
|
|
public Stat(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
@Override
|
|
public int compareTo(Stat o) {
|
|
|
|
float compareQuantity = ((Stat) o).getValToRank();
|
|
|
|
float d = this.getValToRank() - compareQuantity;
|
|
int i = (int) d;
|
|
|
|
//ascending order
|
|
return i;
|
|
|
|
//descending order
|
|
//return compareQuantity - this.quantity;
|
|
}
|
|
|
|
// getter
|
|
public String getName() { return name; }
|
|
public String getTeam() { return team; }
|
|
public double getValRot() { return valRot; }
|
|
public String getValSeason() { return valSeason; }
|
|
public float getValRelative() { return valRelative; }
|
|
public double getRank() { return rank; }
|
|
public double getCode() { return code; }
|
|
public String getStatVal() { return statVal; }
|
|
public String getPlayer() { return player; }
|
|
public String getSlot() { return slot; }
|
|
public int getSlotID() { return slotID; }
|
|
public int getPeriod() { return period; }
|
|
public String getValProjection() { return ValProjection; }
|
|
public float getValToRank() { return valToRank; }
|
|
public double getProjectedRK() { return projectedRK; }
|
|
|
|
// setter
|
|
public void setName(String name) { this.name = name; }
|
|
public void setTeam(String team) { this.team = team; }
|
|
public void setValRot(double valRot) { this.valRot = valRot; }
|
|
public void setValSeason(String valSeason) { this.valSeason = valSeason; }
|
|
public void setValRelative(float valRelative) { this.valRelative = valRelative; }
|
|
public void setRank(double rank) { this.rank = rank; }
|
|
public void setCode(int code) { this.code = code; }
|
|
public void setStatVal(String statVal) { this.statVal = statVal; }
|
|
public void setPlayer(String player) { this.player = player; }
|
|
public void setSlot(String slot) { this.slot = slot; }
|
|
public void setSlotID(int slotID) { this.slotID = slotID; }
|
|
public void setPeriod(int period) { this.period = period; }
|
|
public void setValProjection(String valProjection) { this.ValProjection = valProjection; }
|
|
public void setValToRank(float valToRank) { this.valToRank = valToRank; }
|
|
public void setProjectedRK(double projectedRK) { this.projectedRK = projectedRK; }
|
|
}
|
|
|