Skip to content

Commit

Permalink
source clean
Browse files Browse the repository at this point in the history
  • Loading branch information
nicol committed Oct 18, 2024
1 parent b3ea0d4 commit aa792ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/org/magic/api/beans/MTGFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import org.apache.commons.lang3.StringUtils;

public class MTGFormat implements Serializable {
public class MTGFormat implements Serializable , Comparable<MTGFormat>{

public enum FORMATS {STANDARD, LEGACY, VINTAGE, MODERN, COMMANDER, PAUPER, PIONEER, BRAWL, FRONTIER}
public enum AUTHORIZATION {LEGAL, RESTRICTED, BANNED, NOT_LEGAL}
Expand Down Expand Up @@ -49,7 +49,7 @@ public void setFormat(String format) {

@Override
public String toString() {
return getFormat() + " " + formatLegality;
return getFormat();
}

@Override
Expand All @@ -70,4 +70,9 @@ public void setFormat(FORMATS standard) {
format = StringUtils.capitalize(standard.name().toLowerCase());

}

@Override
public int compareTo(MTGFormat o) {
return getFormat().compareTo(o.getFormat());
}
}

0 comments on commit aa792ee

Please sign in to comment.