mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 14:38:45 +00:00
EditScoreDialog shows penalties in lexicographical order
This commit is contained in:
+8
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.domain.common;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* The reasons why a competitor may get the maximum number of points, usually equaling the
|
||||
* number of competitors enlisted for the regatta plus one.
|
||||
@@ -80,4 +82,10 @@ public enum MaxPointsReason {
|
||||
public boolean isAppliesAtStartOfRace() {
|
||||
return appliesAtStartOfRace;
|
||||
}
|
||||
|
||||
public static MaxPointsReason[] getLexicographicalValues() {
|
||||
MaxPointsReason[] result = MaxPointsReason.values();
|
||||
Arrays.sort(result, (o1, o2) -> o1.name().compareToIgnoreCase(o2.name()));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user