Skip to content

Commit

Permalink
refactor: Making inner classes static
Browse files Browse the repository at this point in the history
  • Loading branch information
sgcr committed Oct 31, 2024
1 parent fe2a158 commit d4e1c02
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SpecialEventsPredictionManager {
private final HashMap<Integer, Player> playerInLineup = new HashMap<>();
private final HashMap<Integer, Player> opponentPlayerInLineup = new HashMap<>();

public class Analyse {
public static class Analyse {
private List<SpecialEventsPrediction> specialEventsPredictions;
private Lineup lineup;
private Lineup opponentLineup;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/ifa/FlagLabel.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected void paintComponent(Graphics g) {
super.paintComponent(g);
}

private class TransparentFilter extends RGBImageFilter {
private static class TransparentFilter extends RGBImageFilter {
private int percent;

public TransparentFilter(int percent) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/module/ifa/IfaOverviewDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ public Object getValueAt(int rowIndex, int columnIndex) {
}
}

private class Entry {
private static class Entry {
Country country;
WorldDetailLeague league;
double coolness;
}

private class CountryTableCellRenderer extends DefaultTableCellRenderer {
private static class CountryTableCellRenderer extends DefaultTableCellRenderer {

private static final long serialVersionUID = -5212837673330509051L;

Expand All @@ -213,7 +213,7 @@ public Component getTableCellRendererComponent(JTable table, Object value,
}
}

private class BooleanTableCellRenderer extends DefaultTableCellRenderer {
private static class BooleanTableCellRenderer extends DefaultTableCellRenderer {

private static final long serialVersionUID = -5648974651813645856L;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/ifa/table/SummaryTableSorter.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Integer getIdentifier(int row) {
}
}

class TableCellValue {
static class TableCellValue {
public int row;
public int column;
public Object value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public Component getTableCellRendererComponent(JTable table, Object value,
}
}

private class SkillRenderer extends DoubleRenderer {
private static class SkillRenderer extends DoubleRenderer {

@Serial
private static final long serialVersionUID = 3943598594307257068L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public TableRow getRow(int rowIndex) {
/*
* This class is a simple container for row data.
*/
private class TableRow {
private static class TableRow {

private Substitution sub;
private Problem problem;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/module/lineup/substitution/WhenTextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public String valueToString(Object obj) throws ParseException {

}

private class EditFormatter extends JFormattedTextField.AbstractFormatter {
private static class EditFormatter extends JFormattedTextField.AbstractFormatter {

private static final long serialVersionUID = 4814824765566252119L;
private DocumentFilter filter = new Filter();
Expand All @@ -123,7 +123,7 @@ protected DocumentFilter getDocumentFilter() {
return this.filter;
}

private class Filter extends DocumentFilter {
private static class Filter extends DocumentFilter {

@Override
public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/specialEvents/FilterPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public Component getListCellRendererComponent(JList list, Object value, int inde
}
}

private class PlayerCBItem extends CBItem {
private static class PlayerCBItem extends CBItem {

private int speciality = -1;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/teamAnalyzer/ui/RecapTableSorter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public class RecapTableSorter extends AbstractTableSorter {
//~ Instance fields ----------------------------------------------------------------------------

protected final class NaturalNumericComparator implements
protected static final class NaturalNumericComparator implements
Comparator<String> {
@Override
public int compare(String o1, String o2) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/training/ui/TrainingPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public String getToolTipText(MouseEvent e) {
/**
* JTable class for past and future trainings table
*/
private class TrainingTable extends JTable {
private static class TrainingTable extends JTable {

public TrainingTable(TableModel arg0) {
super(arg0);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module/tsforecast/Curve.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Curve {
private Point m_currentPoint = null;
private Color m_Color = null;

class Point implements Comparable<Point> {
static class Point implements Comparable<Point> {

double m_dSpirit;
int m_iAttitude;
Expand Down

0 comments on commit d4e1c02

Please sign in to comment.