-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FRU improvements and general cleanup
- Loading branch information
Showing
7 changed files
with
104 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...pport/src/main/java/gg/xp/xivsupport/persistence/settings/JobSortValidationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package gg.xp.xivsupport.persistence.settings; | ||
|
||
import gg.xp.xivdata.data.*; | ||
|
||
import java.io.Serial; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.EnumSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class JobSortValidationException extends RuntimeException { | ||
|
||
@Serial | ||
private static final long serialVersionUID = 6391762663338571558L; | ||
private final boolean silent; | ||
private final Set<Job> expected; | ||
private final List<Job> actual; | ||
|
||
JobSortValidationException(final String message, final boolean silent, Set<Job> expected, List<Job> actual) { | ||
super(message); | ||
this.silent = silent; | ||
this.expected = expected.isEmpty() ? Collections.emptySet() : EnumSet.copyOf(expected); | ||
this.actual = new ArrayList<>(actual); | ||
} | ||
|
||
public boolean isSilent() { | ||
return silent; | ||
} | ||
|
||
public Set<Job> getExpected() { | ||
return Collections.unmodifiableSet(expected); | ||
} | ||
|
||
public List<Job> getActual() { | ||
return Collections.unmodifiableList(actual); | ||
} | ||
} |