Compare commits

...

9 Commits

Author SHA1 Message Date
FlavianIuga 497d93c750
Merge bbce187863 into fc8ddf5ac8 2024-05-08 13:25:29 -07:00
translatewiki.net fc8ddf5ac8 Localisation updates from https://translatewiki.net. 2024-04-29 14:05:29 +02:00
translatewiki.net 53f5d5726a Localisation updates from https://translatewiki.net. 2024-04-22 14:05:54 +02:00
translatewiki.net 888b6e3fc9 Localisation updates from https://translatewiki.net. 2024-04-18 14:07:12 +02:00
translatewiki.net 93a2d4410e Localisation updates from https://translatewiki.net. 2024-04-15 14:06:20 +02:00
FlavianIuga bbce187863 Miscellaneous code cleanup 2023-01-25 16:22:50 +02:00
FlavianIuga 4db447e9e6 Removed unnecessary modifiers - code cleanup 2023-01-25 14:56:52 +02:00
FlavianIuga 44724605f8 Move array indicators on type declaration - code cleanup 2023-01-25 14:23:03 +02:00
FlavianIuga a17ccaa226 Reordering modifiers - code cleanup 2023-01-25 14:19:54 +02:00
111 changed files with 276 additions and 244 deletions

View File

@ -563,7 +563,7 @@ model.option.equipScoutCheat.name=Späher ausrüsten
model.option.equipScoutCheat.shortDescription=Chance in Prozent, dass pro Zug ein KI-Spieler in Europa eine Einheit kostenlos zu einem Späher ausrüstet. model.option.equipScoutCheat.shortDescription=Chance in Prozent, dass pro Zug ein KI-Spieler in Europa eine Einheit kostenlos zu einem Späher ausrüstet.
model.option.equipPioneerCheat.name=Pionier ausrüsten model.option.equipPioneerCheat.name=Pionier ausrüsten
model.option.equipPioneerCheat.shortDescription=Chance in Prozent, dass pro Zug eine KI eine Einheit in Europa als Pionier kostenlos ausrüstet. model.option.equipPioneerCheat.shortDescription=Chance in Prozent, dass pro Zug eine KI eine Einheit in Europa als Pionier kostenlos ausrüstet.
model.option.landUnitCheat.name=Erhalte Landeinheit model.option.landUnitCheat.name=Landeinheit erhalten
model.option.landUnitCheat.shortDescription=Chance in Prozent, dass pro Zug ein KI-Spieler in Europa eine freie nützliche Landeinheit erhält. model.option.landUnitCheat.shortDescription=Chance in Prozent, dass pro Zug ein KI-Spieler in Europa eine freie nützliche Landeinheit erhält.
model.option.offensiveLandUnitCheat.name=Eine offensive Landeinheit erhalten model.option.offensiveLandUnitCheat.name=Eine offensive Landeinheit erhalten
model.option.offensiveLandUnitCheat.shortDescription=Chance in Prozent, dass pro Zug eine KI eine kostenlose offensive Landeinheit in Europa erhält. model.option.offensiveLandUnitCheat.shortDescription=Chance in Prozent, dass pro Zug eine KI eine kostenlose offensive Landeinheit in Europa erhält.

View File

@ -2,6 +2,7 @@
# Exported from translatewiki.net # Exported from translatewiki.net
# Author: Amaia # Author: Amaia
# Author: An13sa # Author: An13sa
# Author: Atzerritik
# Author: EukeneFL # Author: EukeneFL
# Author: Joxemai # Author: Joxemai
# Author: Kobazulo # Author: Kobazulo
@ -25,6 +26,7 @@ veryWet=Oso hezea
warm=Epela warm=Epela
wet=Hezea wet=Hezea
freecol.desktopEntry.GenericName=Estrategia jokoa freecol.desktopEntry.GenericName=Estrategia jokoa
freecol.desktopEntry.Comment="Sid Meier's Colonization"-en oinarritutako txandakako estrategia jokoa.
accept=Onartu accept=Onartu
all=Guztiak all=Guztiak
and=eta and=eta
@ -81,6 +83,7 @@ yes=Bai
abilities=Gaitasunak abilities=Gaitasunak
activateAllUnits=Unitate guztiak aktibatu activateAllUnits=Unitate guztiak aktibatu
activateUnit=Unitatea aktibatu activateUnit=Unitatea aktibatu
assignTradeRoute=Merkataritza ibilbidea esleitu
building=Eraikuntza building=Eraikuntza
capital=Hiriburua capital=Hiriburua
cargo=Zama cargo=Zama

View File

@ -304,6 +304,8 @@ gotoTileAction.accelerator=G
gotoTileAction.name=Ir al tegula gotoTileAction.name=Ir al tegula
loadAction.name=Cargar loadAction.name=Cargar
mapControlsAction.name=Controlos del carta mapControlsAction.name=Controlos del carta
mapEditorToolboxPanelAction.name=Instrumentario
mapEditorTransformPanelAction.name=Transformation de tegulas
mapEditorAction.name=Editor cartographic mapEditorAction.name=Editor cartographic
mapGeneratorOptionsAction.name=Monstrar optiones del generator de cartas mapGeneratorOptionsAction.name=Monstrar optiones del generator de cartas
miniMapToggleBordersAction.name=Alternar le vista inter politic e economic miniMapToggleBordersAction.name=Alternar le vista inter politic e economic
@ -560,6 +562,8 @@ model.option.continueFoundingFatherRecruitment.name=Continuar a recrutar Patres
model.option.continueFoundingFatherRecruitment.shortDescription=Continuar a recrutar Patres Fundatores post que le independentia es concedite. model.option.continueFoundingFatherRecruitment.shortDescription=Continuar a recrutar Patres Fundatores post que le independentia es concedite.
model.option.teleportREF.name=Teleport REF model.option.teleportREF.name=Teleport REF
model.option.teleportREF.shortDescription=REF appare al sito de arrivata pro su prime destination. model.option.teleportREF.shortDescription=REF appare al sito de arrivata pro su prime destination.
model.option.mapDefinedStartingPositions.name=Usar le positiones de initio definite per le carta (si disponibile).
model.option.mapDefinedStartingPositions.shortDescription=Le positiones de initio definite per le autor del carta es usate, si illos es disponibile.
model.option.startingPositions.name=Positiones de initio model.option.startingPositions.name=Positiones de initio
model.option.startingPositions.shortDescription=Determina le positiones initial del jocatores europee. model.option.startingPositions.shortDescription=Determina le positiones initial del jocatores europee.
model.option.startingPositions.classic.name=Classic model.option.startingPositions.classic.name=Classic
@ -2340,6 +2344,7 @@ error.mapEditorGame=Tu tenta initiar un carta (desde le editor cartographic) com
main.defaultPlayerName=Nomine del jocator main.defaultPlayerName=Nomine del jocator
main.javaVersion=Java version %minVersion% o melior es recommendate pro executar FreeCol\n(%version% detegite, usa --no-java-check pro saltar iste verification). main.javaVersion=Java version %minVersion% o melior es recommendate pro executar FreeCol\n(%version% detegite, usa --no-java-check pro saltar iste verification).
main.memory=Es necessari assignar plus de %memory% bytes de memoria pro usar le JVM.\nReinitia FreeCol con: java -Xmx%minMemory%M -jar FreeCol.jar main.memory=Es necessari assignar plus de %memory% bytes de memoria pro usar le JVM.\nReinitia FreeCol con: java -Xmx%minMemory%M -jar FreeCol.jar
main.memoryLow=ATTENTION! Tu ha initiate FreeCol con solmente %memory% bytes de memoria pro le machina virtual de Java.\n Es fortemente recommendate executar FreeCol con al minus 2GB de memoria.\n Reinitia FreeCol con: java -Xmx%minMemory% -jar FreeCol.jar
main.userDir.fail=FreeCol non ha trovate directorios apte pro salveguardar le datos de usator. Le programma pote continuar, ma tu debe expectar problemas. main.userDir.fail=FreeCol non ha trovate directorios apte pro salveguardar le datos de usator. Le programma pote continuar, ma tu debe expectar problemas.
main.userDir.noHome=Non poteva trovar le directorio de base del usator. main.userDir.noHome=Non poteva trovar le directorio de base del usator.
main.userDir.badDir=Non es possibile scriber in le directorio: %name% main.userDir.badDir=Non es possibile scriber in le directorio: %name%
@ -2870,6 +2875,7 @@ colonyPanel.populationLabel=Total: %number%
colonyPanel.rebelLabel=Rebellos: %number% colonyPanel.rebelLabel=Rebellos: %number%
colonyPanel.royalistLabel=Royalistas: %number% colonyPanel.royalistLabel=Royalistas: %number%
colonyPanel.notBestTile=%unit% poterea producer plus %goods% in %tile%. colonyPanel.notBestTile=%unit% poterea producer plus %goods% in %tile%.
model.buildableType.currentlyBuilding=%buildable%
confirmDeclarationDialog.areYouSure.no=Forsan plus tarde confirmDeclarationDialog.areYouSure.no=Forsan plus tarde
confirmDeclarationDialog.areYouSure.text=Que nos renuncia al tyrannia injuste de %monarch% e declara le independentia de nostre colonias del corona! confirmDeclarationDialog.areYouSure.text=Que nos renuncia al tyrannia injuste de %monarch% e declara le independentia de nostre colonias del corona!
confirmDeclarationDialog.areYouSure.yes=Libertate o morte! confirmDeclarationDialog.areYouSure.yes=Libertate o morte!
@ -2980,6 +2986,8 @@ indianSettlementPanel.learnableSkill=Le sequente mestiero pote esser apprendite
indianSettlementPanel.highlyWanted=Iste stabilimento es multo interessate in le commercio de: indianSettlementPanel.highlyWanted=Iste stabilimento es multo interessate in le commercio de:
indianSettlementPanel.otherWanted=Altere benes que pote esser commerciate in iste stabilimento es: indianSettlementPanel.otherWanted=Altere benes que pote esser commerciate in iste stabilimento es:
indianSettlementPanel.mostHated=Le nation le plus odiate in iste stabilimento: indianSettlementPanel.mostHated=Le nation le plus odiate in iste stabilimento:
minimapPanel.title=Mini-carta
infoPanel.title=Information
infoPanel.defenseBonus=Defensa %bonus%% infoPanel.defenseBonus=Defensa %bonus%%
infoPanel.endTurn=Preme Enter pro finir le torno. infoPanel.endTurn=Preme Enter pro finir le torno.
infoPanel.movementCost=Movimento %cost% infoPanel.movementCost=Movimento %cost%
@ -2992,12 +3000,17 @@ loadingSavegameDialog.serverName=Nomine del servitor:
loadingSavegameDialog.singlePlayer=Un sol jocator loadingSavegameDialog.singlePlayer=Un sol jocator
loadingSavegameDialog.name=Cargamento de partita salveguardate loadingSavegameDialog.name=Cargamento de partita salveguardate
mapEditor.loadedWithMods=Tu ha initiate le editor de cartas con modificationes active que contine cambios de specification. Per favor nota que le mesme modificationes debe esser activate manualmente per cata usator que carga cartas que usa un nove cosa de un modification.\n\nTu pote retornar al menu principal e deactivar alcun modificationes per medio del Preferentias si isto non esseva intentional. mapEditor.loadedWithMods=Tu ha initiate le editor de cartas con modificationes active que contine cambios de specification. Per favor nota que le mesme modificationes debe esser activate manualmente per cata usator que carga cartas que usa un nove cosa de un modification.\n\nTu pote retornar al menu principal e deactivar alcun modificationes per medio del Preferentias si isto non esseva intentional.
mapEditor.chooseAreaModificationPanel.title=Elige area
mapEditor.toolBoxPanel.title=Instrumentario
mapEditor.tool.paintBrush.name=Pinger
mapEditorTransformPanel.title=Transformation de tegulas
mapEditorTransformPanel.chooseResource=Selige un ressource mapEditorTransformPanel.chooseResource=Selige un ressource
mapEditorTransformPanel.majorRiver=Fluvio major mapEditorTransformPanel.majorRiver=Fluvio major
mapEditorTransformPanel.minorRiver=Fluvio minor mapEditorTransformPanel.minorRiver=Fluvio minor
mapEditorTransformPanel.changeRiverConnections=Adder/remover connexiones de fluvio mapEditorTransformPanel.changeRiverConnections=Adder/remover connexiones de fluvio
mapEditorTransformPanel.setRiverStyle=Fixar stilo de fluvio mapEditorTransformPanel.setRiverStyle=Fixar stilo de fluvio
mapEditorTransformPanel.resource=Modificar/remover ressource mapEditorTransformPanel.resource=Modificar/remover ressource
mapEditorTransformPanel.selectArea=Adder/remover tegulas del area
freecol.map.L_America_JsTheDude=<html>L America<br><font size="-2">Per JsTheDude</font></html> freecol.map.L_America_JsTheDude=<html>L America<br><font size="-2">Per JsTheDude</font></html>
freecol.map.L_America_Mazim=<html>L America<br>Per Mazim</html> freecol.map.L_America_Mazim=<html>L America<br>Per Mazim</html>
freecol.map.L_Asia_Mazim=<html>L Asia<br>Per Mazim</html> freecol.map.L_Asia_Mazim=<html>L Asia<br>Per Mazim</html>

View File

@ -540,6 +540,8 @@ model.option.importBonuses.name=Impor bonus
model.option.importRumours.name=Impor rumor model.option.importRumours.name=Impor rumor
model.option.importSettlements.name=Impor pemukiman model.option.importSettlements.name=Impor pemukiman
clientOptions.name=Preferensi clientOptions.name=Preferensi
model.option.playerName.name=Nama pemain:
clientOptions.display.name=Tampilan
model.option.displayScaling.automatic=Otomatis model.option.displayScaling.automatic=Otomatis
clientOptions.interface.name=Antarmuka clientOptions.interface.name=Antarmuka
model.option.languageOption.name=Bahasa model.option.languageOption.name=Bahasa
@ -553,6 +555,9 @@ model.option.guiMinNumberToDisplayGoods.shortDescription=Barang-barang akan ditu
model.option.displayGrid.name=Tampilkan Kisi-kisi model.option.displayGrid.name=Tampilkan Kisi-kisi
model.option.displayBorders.name=Tampilkan Perbatasan model.option.displayBorders.name=Tampilkan Perbatasan
model.option.displayFogOfWar.name=Tampilkan Kabut-Perang model.option.displayFogOfWar.name=Tampilkan Kabut-Perang
model.option.useOpenGL.name=Aktifkan OpenGL
model.option.useXRender.name=Aktifkan XRender
model.option.useTerrainAnimations.name=Aktifkan Animasi Medan
clientOptions.gui.mapControls.ClassicMapControls.name=Klasik clientOptions.gui.mapControls.ClassicMapControls.name=Klasik
model.option.color.background.name=Warna Latar model.option.color.background.name=Warna Latar
clientOptions.minimap.color.background.black=Hitam clientOptions.minimap.color.background.black=Hitam
@ -569,6 +574,7 @@ clientOptions.gui.displayColonyLabels.classic.name=Klasik
clientOptions.gui.displayColonyLabels.classic.shortDescription=Labeli koloni dengan nama dan ukuran clientOptions.gui.displayColonyLabels.classic.shortDescription=Labeli koloni dengan nama dan ukuran
clientOptions.gui.displayColonyLabels.modern.name=Modern clientOptions.gui.displayColonyLabels.modern.name=Modern
model.option.colonyComparator.name=Golongkan koloni sesuai model.option.colonyComparator.name=Golongkan koloni sesuai
clientOptions.gui.colonyComparator.byName.name=Nama
clientOptions.gui.colonyComparator.byPosition.name=Posisi clientOptions.gui.colonyComparator.byPosition.name=Posisi
clientOptions.gui.colonyComparator.bySize.name=Ukuran clientOptions.gui.colonyComparator.bySize.name=Ukuran
clientOptions.gui.graphicsQuality.lowest=Terendah clientOptions.gui.graphicsQuality.lowest=Terendah
@ -584,9 +590,14 @@ clientOptions.gui.enemyMoveAnimationSpeed.off=Mati
clientOptions.gui.enemyMoveAnimationSpeed.slow=Pelan clientOptions.gui.enemyMoveAnimationSpeed.slow=Pelan
clientOptions.gui.enemyMoveAnimationSpeed.normal=Normal clientOptions.gui.enemyMoveAnimationSpeed.normal=Normal
clientOptions.gui.enemyMoveAnimationSpeed.fast=Cepat clientOptions.gui.enemyMoveAnimationSpeed.fast=Cepat
clientOptions.gui.friendlyMoveAnimationSpeed.off=Mati
clientOptions.gui.friendlyMoveAnimationSpeed.slow=Pelan
clientOptions.gui.friendlyMoveAnimationSpeed.normal=Normal
clientOptions.gui.friendlyMoveAnimationSpeed.fast=Cepat
clientOptions.messages.name=Pesan clientOptions.messages.name=Pesan
model.option.guiMessagesGroupBy.name=Kelompokkan pesan dengan model.option.guiMessagesGroupBy.name=Kelompokkan pesan dengan
model.option.guiMessagesGroupBy.shortDescription=Tetapkan bagaimana pesan akan dikelompokkan model.option.guiMessagesGroupBy.shortDescription=Tetapkan bagaimana pesan akan dikelompokkan
clientOptions.messages.guiMessagesGroupBy.source.name=Sumber
model.option.guiShowBuildingCompleted.name=Pesan penyelesaian pembangunan model.option.guiShowBuildingCompleted.name=Pesan penyelesaian pembangunan
model.option.guiShowForeignDiplomacy.name=Pesan diplomasi bangsa asing model.option.guiShowForeignDiplomacy.name=Pesan diplomasi bangsa asing
model.option.guiShowGovernmentEfficiency.name=Pesan efisiensi pemerintahan model.option.guiShowGovernmentEfficiency.name=Pesan efisiensi pemerintahan

View File

@ -2772,7 +2772,7 @@ serverListPanel.gameState.0=Baru
serverListPanel.gameState.1=Bermain serverListPanel.gameState.1=Bermain
serverListPanel.gameState.2=Siap serverListPanel.gameState.2=Siap
serverListPanel.players=Pelayan serverListPanel.players=Pelayan
startGamePanel.iAmReady=Saya Sedia startGamePanel.iAmReady=Saya Sudah Bersedia
info.noEuropeans=Syarat kemenangan atas semua orang Eropah lain sudah disempurnakan. Anda perlu sama ada membolehkan satu lagi bangsa Eropah, atau tambahkan lagi syarat kemenangan. info.noEuropeans=Syarat kemenangan atas semua orang Eropah lain sudah disempurnakan. Anda perlu sama ada membolehkan satu lagi bangsa Eropah, atau tambahkan lagi syarat kemenangan.
memoryManager.freeMemory=Bebas memoryManager.freeMemory=Bebas
memoryManager.maxMemory=Maks memoryManager.maxMemory=Maks

View File

@ -841,6 +841,7 @@ clientOptions.personal.shortDescription=Ustawienia specyficzne dla danego gracza
model.option.playerName.name=Nazwa gracza: model.option.playerName.name=Nazwa gracza:
clientOptions.display.name=Grafika clientOptions.display.name=Grafika
model.option.displayScaling.automatic=Automatyczny model.option.displayScaling.automatic=Automatyczny
model.option.displayScaling.75=75 %
model.option.displayScaling.100=100% model.option.displayScaling.100=100%
model.option.displayScaling.125=125% model.option.displayScaling.125=125%
model.option.displayScaling.150=150% model.option.displayScaling.150=150%

View File

@ -14,6 +14,7 @@
# Author: DCamer # Author: DCamer
# Author: Deltaspace # Author: Deltaspace
# Author: Diralik # Author: Diralik
# Author: Dirruw'o
# Author: Eleferen # Author: Eleferen
# Author: Eroha # Author: Eroha
# Author: Eugenia.Chudinova # Author: Eugenia.Chudinova
@ -383,6 +384,7 @@ gotoTileAction.name=Перейти к клетке
loadAction.name=Загрузить loadAction.name=Загрузить
mapControlsAction.accelerator=Ctrl+M mapControlsAction.accelerator=Ctrl+M
mapControlsAction.name=Управление картой mapControlsAction.name=Управление картой
mapEditorToolboxPanelAction.name=Инструменты
mapEditorAction.name=Редактор карт mapEditorAction.name=Редактор карт
mapGeneratorOptionsAction.accelerator=Shift+F12 mapGeneratorOptionsAction.accelerator=Shift+F12
mapGeneratorOptionsAction.name=Показать настройки генератора карты mapGeneratorOptionsAction.name=Показать настройки генератора карты

View File

@ -349,6 +349,7 @@ gotoAction.name=前往
gotoTileAction.name=前往图块 gotoTileAction.name=前往图块
loadAction.name=加载 loadAction.name=加载
mapControlsAction.name=地图控制 mapControlsAction.name=地图控制
mapEditorToolboxPanelAction.name=工具箱
mapEditorAction.name=地图编辑器 mapEditorAction.name=地图编辑器
mapGeneratorOptionsAction.name=显示地图生成器选项 mapGeneratorOptionsAction.name=显示地图生成器选项
miniMapToggleBordersAction.name=在政治和经济之间切换视角 miniMapToggleBordersAction.name=在政治和经济之间切换视角
@ -3106,6 +3107,8 @@ indianSettlementPanel.learnableSkill=下列技能可以在这个部落被学会
indianSettlementPanel.highlyWanted=这个部落对这种货物很感兴趣: indianSettlementPanel.highlyWanted=这个部落对这种货物很感兴趣:
indianSettlementPanel.otherWanted=其它可以在这个部落交易的货物包括: indianSettlementPanel.otherWanted=其它可以在这个部落交易的货物包括:
indianSettlementPanel.mostHated=在此定居最讨厌的国家: indianSettlementPanel.mostHated=在此定居最讨厌的国家:
minimapPanel.title=小地图
infoPanel.title=信息
infoPanel.defenseBonus=防御奖励%bonus%% infoPanel.defenseBonus=防御奖励%bonus%%
infoPanel.endTurn=请按回车键来结束回合。 infoPanel.endTurn=请按回车键来结束回合。
infoPanel.movementCost=活动%cost% infoPanel.movementCost=活动%cost%
@ -3118,6 +3121,9 @@ loadingSavegameDialog.serverName=服务器名称:
loadingSavegameDialog.singlePlayer=单人游戏 loadingSavegameDialog.singlePlayer=单人游戏
loadingSavegameDialog.name=读取存档中 loadingSavegameDialog.name=读取存档中
mapEditor.loadedWithMods=您已使用包含规范变更的活动模组启动了地图编辑器。请注意,每个加载使用模组中任何新内容的地图的用户都需要手动激活相同的模组。\n\n如果这不是故意的您可以返回主菜单并通过首选项停用任何模组。 mapEditor.loadedWithMods=您已使用包含规范变更的活动模组启动了地图编辑器。请注意,每个加载使用模组中任何新内容的地图的用户都需要手动激活相同的模组。\n\n如果这不是故意的您可以返回主菜单并通过首选项停用任何模组。
mapEditor.chooseAreaModificationPanel.title=选择区域
mapEditor.toolBoxPanel.title=工具箱
mapEditor.tool.paintBrush.name=绘制
mapEditorTransformPanel.chooseResource=选择资源 mapEditorTransformPanel.chooseResource=选择资源
mapEditorTransformPanel.majorRiver=大河 mapEditorTransformPanel.majorRiver=大河
mapEditorTransformPanel.minorRiver=小河 mapEditorTransformPanel.minorRiver=小河

View File

@ -154,9 +154,7 @@ public final class ConnectController extends FreeColClientHolder {
switch (reason) { switch (reason) {
case DEFEATED: case QUIT: case DEFEATED: case QUIT:
fcc.logout(false); fcc.logout(false);
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(this::mainTitle);
mainTitle();
});
break; break;
case LOGIN: // Occurs when you Open a new game during a current one case LOGIN: // Occurs when you Open a new game during a current one
fcc.logout(false); fcc.logout(false);

View File

@ -149,7 +149,7 @@ public final class InGameController extends FreeColClientHolder {
* Selecting next unit depends on mode--- either from the active list, * Selecting next unit depends on mode--- either from the active list,
* from the going-to list, or flush going-to and end the turn. * from the going-to list, or flush going-to and end the turn.
*/ */
private static enum MoveMode { private enum MoveMode {
NEXT_ACTIVE_UNIT, NEXT_ACTIVE_UNIT,
EXECUTE_GOTO_ORDERS, EXECUTE_GOTO_ORDERS,
END_TURN; END_TURN;

View File

@ -54,7 +54,7 @@ public class FontLibrary {
* <li>HEADER -- a stylized old-fashioned typeface for headers</li> * <li>HEADER -- a stylized old-fashioned typeface for headers</li>
* </ul> * </ul>
*/ */
public static enum FontType { public enum FontType {
NORMAL, NORMAL,
SIMPLE, SIMPLE,
HEADER HEADER

View File

@ -116,7 +116,7 @@ public class GUI extends FreeColClientHolder {
}; };
/** Levels (danger, finance) for confirmEuropeanTribute(). */ /** Levels (danger, finance) for confirmEuropeanTribute(). */
private static final String levels[] = { "low", "normal", "high" }; private static final String[] levels = { "low", "normal", "high" };
/** /**

View File

@ -138,7 +138,7 @@ import net.sf.freecol.common.util.Utils;
public class SwingGUI extends GUI { public class SwingGUI extends GUI {
/** A rough position to place dialogs and panels on the canvas. */ /** A rough position to place dialogs and panels on the canvas. */
public static enum PopupPosition { public enum PopupPosition {
ORIGIN, ORIGIN,
CENTERED, CENTERED,
CENTERED_LEFT, CENTERED_LEFT,

View File

@ -34,7 +34,7 @@ public class ColopediaAction extends FreeColAction {
public static final String id = "colopediaAction."; public static final String id = "colopediaAction.";
// Order of elements will influence ingame order of menu items. // Order of elements will influence ingame order of menu items.
public static enum PanelType { public enum PanelType {
TERRAIN, RESOURCES, GOODS, UNITS, TERRAIN, RESOURCES, GOODS, UNITS,
BUILDINGS, FATHERS, NATIONS, BUILDINGS, FATHERS, NATIONS,
NATION_TYPES, CONCEPTS; NATION_TYPES, CONCEPTS;

View File

@ -39,7 +39,7 @@ public final class DisplayTileTextAction extends SelectableOptionAction {
public static final String id = "displayTileTextAction."; public static final String id = "displayTileTextAction.";
// FIXME: make ClientOptions use enum // FIXME: make ClientOptions use enum
public static enum DisplayText { public enum DisplayText {
EMPTY, NAMES, OWNERS, REGIONS; EMPTY, NAMES, OWNERS, REGIONS;
public String getKey() { public String getKey() {

View File

@ -41,8 +41,8 @@ public class Animations {
* used as a callback for an animation to trigger painting. * used as a callback for an animation to trigger painting.
*/ */
public interface Procedure { public interface Procedure {
public void execute(); void execute();
}; }
/** /**
* Collect animations for a unit move. * Collect animations for a unit move.

View File

@ -96,7 +96,7 @@ public final class UnitImageAnimation extends Animation {
* @param direction The preferred {@code Direction}. * @param direction The preferred {@code Direction}.
* @return A list of {@code Direction}s. * @return A list of {@code Direction}s.
*/ */
private synchronized static List<Direction> trialDirections(Direction direction) { private static synchronized List<Direction> trialDirections(Direction direction) {
if (alternatives.isEmpty()) { // Populate first time if (alternatives.isEmpty()) { // Populate first time
// Favour the closest E-W cases // Favour the closest E-W cases
for (Direction d : Direction.allDirections) { for (Direction d : Direction.allDirections) {

View File

@ -123,7 +123,7 @@ public class Flag {
public Set<UnionPosition> getUnionPositions() { public Set<UnionPosition> getUnionPositions() {
return this.unionPositions; return this.unionPositions;
} }
}; }
/** /**
* The shape of the "union", which generally depends on the * The shape of the "union", which generally depends on the
@ -135,7 +135,7 @@ public class Flag {
CHEVRON, CHEVRON,
BEND, BEND,
RHOMBUS RHOMBUS
}; }
/** /**
* The position of the "union", which depends on the alignment of * The position of the "union", which depends on the alignment of

View File

@ -69,10 +69,10 @@ public class FreeColDialog<T> extends JDialog implements PropertyChangeListener
private static final Logger logger = Logger.getLogger(FreeColDialog.class.getName()); private static final Logger logger = Logger.getLogger(FreeColDialog.class.getName());
public static enum DialogType { public enum DialogType {
PLAIN, PLAIN,
QUESTION, QUESTION,
}; }
/** The enclosing client. */ /** The enclosing client. */
protected final FreeColClient freeColClient; protected final FreeColClient freeColClient;

View File

@ -365,7 +365,7 @@ public final class NegotiationDialog extends FreeColDialog<DiplomaticTrade> {
super(new MigLayout("wrap 1", "", "")); super(new MigLayout("wrap 1", "", ""));
this.source = source; this.source = source;
this.goodsBox = new JComboBox<>(new DefaultComboBoxModel<Goods>()); this.goodsBox = new JComboBox<>(new DefaultComboBoxModel<>());
this.goodsBox.setRenderer(new GoodsBoxRenderer()); this.goodsBox.setRenderer(new GoodsBoxRenderer());
this.clearButton = Utility.localizedButton("negotiationDialog.clear"); this.clearButton = Utility.localizedButton("negotiationDialog.clear");
this.clearButton.addActionListener(this); this.clearButton.addActionListener(this);
@ -494,7 +494,7 @@ public final class NegotiationDialog extends FreeColDialog<DiplomaticTrade> {
this.source = source; this.source = source;
this.other = other; this.other = other;
this.victimBox = new JComboBox<>(new DefaultComboBoxModel<Player>()); this.victimBox = new JComboBox<>(new DefaultComboBoxModel<>());
this.victimBox.setRenderer(new InciteBoxRenderer()); this.victimBox.setRenderer(new InciteBoxRenderer());
this.clearButton = Utility.localizedButton("negotiationDialog.clear"); this.clearButton = Utility.localizedButton("negotiationDialog.clear");
this.clearButton.addActionListener(this); this.clearButton.addActionListener(this);
@ -615,7 +615,7 @@ public final class NegotiationDialog extends FreeColDialog<DiplomaticTrade> {
this.source = source; this.source = source;
this.target = target; this.target = target;
this.stanceBox = new JComboBox<>(new DefaultComboBoxModel<Stance>()); this.stanceBox = new JComboBox<>(new DefaultComboBoxModel<>());
this.stanceBox.setRenderer(new StanceBoxRenderer()); this.stanceBox.setRenderer(new StanceBoxRenderer());
this.clearButton = Utility.localizedButton("negotiationDialog.clear"); this.clearButton = Utility.localizedButton("negotiationDialog.clear");
this.clearButton.addActionListener(this); this.clearButton.addActionListener(this);
@ -733,7 +733,7 @@ public final class NegotiationDialog extends FreeColDialog<DiplomaticTrade> {
super(new MigLayout("wrap 1", "", "")); super(new MigLayout("wrap 1", "", ""));
this.source = source; this.source = source;
this.unitBox = new JComboBox<>(new DefaultComboBoxModel<Unit>()); this.unitBox = new JComboBox<>(new DefaultComboBoxModel<>());
this.unitBox.setRenderer(new UnitBoxRenderer()); this.unitBox.setRenderer(new UnitBoxRenderer());
this.clearButton = Utility.localizedButton("negotiationDialog.clear"); this.clearButton = Utility.localizedButton("negotiationDialog.clear");
this.clearButton.addActionListener(this); this.clearButton.addActionListener(this);

View File

@ -253,7 +253,7 @@ public final class BaseTileTransitionImageCreator {
return null; return null;
} }
final ImageResource terrainImageResource; final ImageResource terrainImageResource;
final boolean notABeachTransition = borderingTile.isLand() || !borderingTile.isLand() && !tile.isLand();; final boolean notABeachTransition = borderingTile.isLand() || !borderingTile.isLand() && !tile.isLand();
if (notABeachTransition) { if (notABeachTransition) {
terrainImageResource = ImageCache.getImageResource(ImageLibrary.getTerrainImageKey(borderingTile.getType())); terrainImageResource = ImageCache.getImageResource(ImageLibrary.getTerrainImageKey(borderingTile.getType()));
} else { } else {

View File

@ -38,7 +38,7 @@ public interface CargoLabel {
* @param cargoPanel The CargoPanel to affect. * @param cargoPanel The CargoPanel to affect.
* @return True if the component was added. * @return True if the component was added.
*/ */
public boolean addCargo(Component comp, Unit carrier, CargoPanel cargoPanel); boolean addCargo(Component comp, Unit carrier, CargoPanel cargoPanel);
/** /**
@ -47,7 +47,7 @@ public interface CargoLabel {
* @param comp The Component to remove. * @param comp The Component to remove.
* @param cargoPanel The {@link CargoPanel} to affect. * @param cargoPanel The {@link CargoPanel} to affect.
*/ */
public default void removeCargo(Component comp, CargoPanel cargoPanel) { default void removeCargo(Component comp, CargoPanel cargoPanel) {
cargoPanel.update(); cargoPanel.update();
} }

View File

@ -27,5 +27,5 @@ public interface Draggable {
* *
* @return True if the object is on a carrier. * @return True if the object is on a carrier.
*/ */
public boolean isOnCarrier(); boolean isOnCarrier();
} }

View File

@ -106,7 +106,7 @@ public final class MapViewer extends FreeColClientHolder {
private static final Logger logger = Logger.getLogger(MapViewer.class.getName()); private static final Logger logger = Logger.getLogger(MapViewer.class.getName());
private static enum BorderType { COUNTRY, REGION } private enum BorderType { COUNTRY, REGION }
/** /**
* Calculates what part of the {@link Map} is visible on screen. This includes handling * Calculates what part of the {@link Map} is visible on screen. This includes handling

View File

@ -84,7 +84,7 @@ public final class OptionGroupUI extends MigPanel
Option option = (Option)node.getUserObject(); Option option = (Option)node.getUserObject();
return Messages.getName(option.getId()); return Messages.getName(option.getId());
} }
}; }
private final List<OptionUpdater> optionUpdaters = new ArrayList<>(); private final List<OptionUpdater> optionUpdaters = new ArrayList<>();

View File

@ -32,11 +32,11 @@ public interface OptionUpdater {
* Updates the value of the {@link net.sf.freecol.common.option.Option} * Updates the value of the {@link net.sf.freecol.common.option.Option}
* this object keeps. * this object keeps.
*/ */
public void updateOption(); void updateOption();
/** /**
* Reset with the value from the option. * Reset with the value from the option.
*/ */
public void reset(); void reset();
} }

View File

@ -1602,8 +1602,7 @@ public final class ColonyPanel extends PortPanel
*/ */
@Override @Override
public JToolTip createToolTip() { public JToolTip createToolTip() {
JToolTip toolTip = new RebelToolTip(getFreeColClient(), getColony()); return new RebelToolTip(getFreeColClient(), getColony());
return toolTip;
} }

View File

@ -34,7 +34,7 @@ public interface DropTarget {
* @param goods The {@code Goods} to check. * @param goods The {@code Goods} to check.
* @return True if the goods are acceptable. * @return True if the goods are acceptable.
*/ */
public default boolean accepts(Goods goods) { default boolean accepts(Goods goods) {
return false; return false;
} }
@ -44,7 +44,7 @@ public interface DropTarget {
* @param goodsType The {@code GoodsType} to check. * @param goodsType The {@code GoodsType} to check.
* @return True if the goods type is acceptable. * @return True if the goods type is acceptable.
*/ */
public default boolean accepts(GoodsType goodsType) { default boolean accepts(GoodsType goodsType) {
return false; return false;
} }
@ -54,7 +54,7 @@ public interface DropTarget {
* @param unit The {@code Unit} to check. * @param unit The {@code Unit} to check.
* @return True if the unit is acceptable. * @return True if the unit is acceptable.
*/ */
public default boolean accepts(Unit unit) { default boolean accepts(Unit unit) {
return false; return false;
} }
@ -71,7 +71,7 @@ public interface DropTarget {
* currently selected carrier. * currently selected carrier.
* @return The component argument on success, null on failure. * @return The component argument on success, null on failure.
*/ */
public Component add(Component comp, boolean editState); Component add(Component comp, boolean editState);
/** /**
* Get a suggested amount of goods to add, used when partial * Get a suggested amount of goods to add, used when partial
@ -80,7 +80,7 @@ public interface DropTarget {
* @param goodsType The {@code GoodsType} proposed to add. * @param goodsType The {@code GoodsType} proposed to add.
* @return A good amount of goods to add. * @return A good amount of goods to add.
*/ */
public default int suggested(GoodsType goodsType) { default int suggested(GoodsType goodsType) {
return -1; // Not applicable return -1; // Not applicable
} }
} }

View File

@ -592,7 +592,7 @@ public final class EuropePanel extends PortPanel {
} }
public static enum EuropeAction { public enum EuropeAction {
EXIT, EXIT,
RECRUIT, RECRUIT,
PURCHASE, PURCHASE,

View File

@ -88,7 +88,7 @@ public final class FindSettlementPanel extends FreeColPanel
} }
} }
private static enum DisplayListOption { private enum DisplayListOption {
ALL, ALL,
ONLY_NATIVES, ONLY_NATIVES,
ONLY_EUROPEAN ONLY_EUROPEAN

View File

@ -258,8 +258,8 @@ public class FreeColImageBorder extends AbstractBorder {
return image; return image;
} }
final Dimension scaledDimensions = new Dimension( final Dimension scaledDimensions = new Dimension(
(int) Math.round(image.getWidth() * scaleFactor), Math.round(image.getWidth() * scaleFactor),
(int) Math.round(image.getHeight() * scaleFactor) Math.round(image.getHeight() * scaleFactor)
); );
return ir.getImage(scaledDimensions, false); return ir.getImage(scaledDimensions, false);
} }

View File

@ -74,7 +74,7 @@ public final class InfoPanel extends FreeColPanel
private static final Logger logger = Logger.getLogger(InfoPanel.class.getName()); private static final Logger logger = Logger.getLogger(InfoPanel.class.getName());
private static enum InfoPanelMode { private enum InfoPanelMode {
NONE, END, MAP, TILE, UNIT; NONE, END, MAP, TILE, UNIT;
} }

View File

@ -101,8 +101,7 @@ public final class MainPanel extends FreeColPanel {
} }
private JButton createImportantButton(Action action) { private JButton createImportantButton(Action action) {
final FreeColButton button = new FreeColButton(ButtonStyle.IMPORTANT, action); return new FreeColButton(ButtonStyle.IMPORTANT, action);
return button;
} }

View File

@ -66,7 +66,7 @@ public final class NewPanel extends FreeColPanel implements ItemListener {
private static final Logger logger = Logger.getLogger(NewPanel.class.getName()); private static final Logger logger = Logger.getLogger(NewPanel.class.getName());
/** The actions for this panel. */ /** The actions for this panel. */
private static enum NewPanelAction { private enum NewPanelAction {
OK, OK,
CANCEL, CANCEL,
SINGLE, SINGLE,
@ -74,7 +74,7 @@ public final class NewPanel extends FreeColPanel implements ItemListener {
START, START,
META_SERVER, META_SERVER,
SHOW_DIFFICULTY SHOW_DIFFICULTY
}; }
/** /**
* A particular specification to use for the new game. If not * A particular specification to use for the new game. If not

View File

@ -35,7 +35,7 @@ public interface ColopediaDetailPanel<T> {
* *
* @param root a {@code DefaultMutableTreeNode} * @param root a {@code DefaultMutableTreeNode}
*/ */
public void addSubTrees(DefaultMutableTreeNode root); void addSubTrees(DefaultMutableTreeNode root);
/** /**
* Builds the details panel for the given identifier. * Builds the details panel for the given identifier.
@ -43,6 +43,6 @@ public interface ColopediaDetailPanel<T> {
* @param id The object identifier to display. * @param id The object identifier to display.
* @param panel the detail panel to build * @param panel the detail panel to build
*/ */
public void buildDetail(String id, JPanel panel); void buildDetail(String id, JPanel panel);
} }

View File

@ -86,7 +86,7 @@ public final class ReportCompactColonyPanel extends ReportPanel {
private static class ColonySummary { private static class ColonySummary {
/** Types of production for a given goods type. */ /** Types of production for a given goods type. */
public static enum ProductionStatus { public enum ProductionStatus {
FAIL, // Negative production and below low alarm level FAIL, // Negative production and below low alarm level
BAD, // Negative production BAD, // Negative production
NONE, // No production at all NONE, // No production at all

View File

@ -113,7 +113,7 @@ public class FreeColLookAndFeel extends MetalLookAndFeel {
private static final String transparentPanelUI private static final String transparentPanelUI
= "net.sf.freecol.client.gui.plaf.FreeColTransparentPanelUI"; = "net.sf.freecol.client.gui.plaf.FreeColTransparentPanelUI";
private static final Class uiClasses[] = { private static final Class[] uiClasses = {
FreeColButtonUI.class, FreeColButtonUI.class,
FreeColCheckBoxMenuItemUI.class, FreeColCheckBoxMenuItemUI.class,
FreeColCheckBoxUI.class, FreeColCheckBoxUI.class,

View File

@ -27,5 +27,5 @@ public interface VideoListener {
/** /**
* Called when a playback has stopped. * Called when a playback has stopped.
*/ */
public void stopped(); void stopped();
} }

View File

@ -31,5 +31,5 @@ public interface ObjectWithId {
* *
* @return The object identifier. * @return The object identifier.
*/ */
public String getId(); String getId();
} }

View File

@ -49,7 +49,7 @@ public class FreeColDebugger {
private static final Logger logger = Logger.getLogger(FreeColDebugger.class.getName()); private static final Logger logger = Logger.getLogger(FreeColDebugger.class.getName());
/** The debug modes, any of which may be active. */ /** The debug modes, any of which may be active. */
public static enum DebugMode { public enum DebugMode {
COMMS, // Trace print full c-s communications, and verbose COMMS, // Trace print full c-s communications, and verbose
// (non-i18n) server errors. // (non-i18n) server errors.
DESYNC,// Check frequently for desynchronization DESYNC,// Check frequently for desynchronization

View File

@ -55,7 +55,7 @@ public class NameCache {
private static final String[] DEFAULT_SEASON_IDS private static final String[] DEFAULT_SEASON_IDS
= { "model.season.spring.name", "model.season.autumn.name" }; = { "model.season.spring.name", "model.season.autumn.name" };
private final static String CIBOLA_PREFIX private static final String CIBOLA_PREFIX
= "nameCache.lostCityRumour.cityName."; = "nameCache.lostCityRumour.cityName.";
/** Cities of Cibola. */ /** Cities of Cibola. */

View File

@ -30,6 +30,6 @@ public interface Selector {
* the selector (only used for error reporting) * the selector (only used for error reporting)
* @return a {@code String} value * @return a {@code String} value
*/ */
public String getKey(String selector, String template); String getKey(String selector, String template);
} }

View File

@ -90,7 +90,7 @@ public class FreeColXMLReader extends StreamReaderDelegate
"ProcessingInstruction", "Space", "StartDocument", "ProcessingInstruction", "Space", "StartDocument",
"StartElement" }); "StartElement" });
public static enum ReadScope { public enum ReadScope {
SERVER, // Loading the game in the server SERVER, // Loading the game in the server
NORMAL, // Normal interning read NORMAL, // Normal interning read
NOINTERN, // Do not intern any object that are read NOINTERN, // Do not intern any object that are read

View File

@ -65,7 +65,7 @@ public class FreeColXMLWriter implements Closeable, XMLStreamWriter {
private static final Logger logger = Logger.getLogger(FreeColXMLWriter.class.getName()); private static final Logger logger = Logger.getLogger(FreeColXMLWriter.class.getName());
/** The scope of a FreeCol object write. */ /** The scope of a FreeCol object write. */
public static enum WriteScopeType { public enum WriteScopeType {
CLIENT, // Only the client-visible information CLIENT, // Only the client-visible information
SERVER, // Full server-visible information SERVER, // Full server-visible information
SAVE // Absolutely everything needed to save the game state SAVE // Absolutely everything needed to save the game state

View File

@ -31,12 +31,12 @@ public interface ImageAnimationEvent extends AnimationEvent {
* Returns the image this event contains. * Returns the image this event contains.
* @return The image to be displayed. * @return The image to be displayed.
*/ */
public Image getImage(); Image getImage();
/** /**
* Returns the duration the image should be displayed. * Returns the duration the image should be displayed.
* @return The amount of milliseconds to display the * @return The amount of milliseconds to display the
* image. * image.
*/ */
public int getDurationInMs(); int getDurationInMs();
} }

View File

@ -121,7 +121,7 @@ public class MetaServerUtils {
null, -1, -1, -1, false, null, -1); null, -1, -1, -1, false, null, -1);
/** Type of message to send. */ /** Type of message to send. */
private static enum MetaMessageType { private enum MetaMessageType {
REGISTER, REGISTER,
REMOVE, REMOVE,
SERVERLIST, SERVERLIST,

View File

@ -41,7 +41,7 @@ public interface BaseProduction {
* the work, if null the unattended production is considered. * the work, if null the unattended production is considered.
* @return The amount of goods produced. * @return The amount of goods produced.
*/ */
public default int getBaseProduction(ProductionType productionType, default int getBaseProduction(ProductionType productionType,
GoodsType goodsType, UnitType unitType) { GoodsType goodsType, UnitType unitType) {
if (goodsType == null) return 0; if (goodsType == null) return 0;
if (productionType == null) { if (productionType == null) {
@ -61,5 +61,5 @@ public interface BaseProduction {
* @param unattended Whether the production is unattended. * @param unattended Whether the production is unattended.
* @return A list of {@code ProductionType}s. * @return A list of {@code ProductionType}s.
*/ */
public abstract List<ProductionType> getAvailableProductionTypes(boolean unattended); List<ProductionType> getAvailableProductionTypes(boolean unattended);
} }

View File

@ -50,7 +50,7 @@ public class Building extends WorkLocation
@SuppressWarnings("unused") @SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(Building.class.getName()); private static final Logger logger = Logger.getLogger(Building.class.getName());
private final static double EPSILON = 0.0001; private static final double EPSILON = 0.0001;
public static final String TAG = "building"; public static final String TAG = "building";

View File

@ -72,7 +72,7 @@ public class Colony extends Settlement implements TradeLocation {
/** Number of colonies that a player will trade down to. */ /** Number of colonies that a player will trade down to. */
public static final int TRADE_MARGIN = 5; public static final int TRADE_MARGIN = 5;
public static enum ColonyChangeEvent { public enum ColonyChangeEvent {
POPULATION_CHANGE, POPULATION_CHANGE,
PRODUCTION_CHANGE, PRODUCTION_CHANGE,
BONUS_CHANGE, BONUS_CHANGE,
@ -82,7 +82,7 @@ public class Colony extends Settlement implements TradeLocation {
} }
/** Reasons for not building a buildable. */ /** Reasons for not building a buildable. */
public static enum NoBuildReason { public enum NoBuildReason {
NONE, NONE,
NOT_BUILDING, NOT_BUILDING,
NOT_BUILDABLE, NOT_BUILDABLE,

View File

@ -31,7 +31,7 @@ import java.util.Set;
*/ */
public abstract class CombatModel { public abstract class CombatModel {
public static enum CombatEffectType { public enum CombatEffectType {
// Special results that set the sense of the result. // Special results that set the sense of the result.
NO_RESULT, NO_RESULT,
LOSE, LOSE,

View File

@ -28,13 +28,13 @@ package net.sf.freecol.common.model;
public interface Constants { public interface Constants {
/** Generic "huge" value. */ /** Generic "huge" value. */
public static final int INFINITY = Integer.MAX_VALUE; int INFINITY = Integer.MAX_VALUE;
/** Generic "unsure" value. */ /** Generic "unsure" value. */
public static final int UNDEFINED = Integer.MIN_VALUE; int UNDEFINED = Integer.MIN_VALUE;
/** The result of checkIntegrity. */ /** The result of checkIntegrity. */
public static enum IntegrityType { enum IntegrityType {
INTEGRITY_FAIL(-1), INTEGRITY_FAIL(-1),
INTEGRITY_FIXED(0), INTEGRITY_FIXED(0),
INTEGRITY_GOOD(1); INTEGRITY_GOOD(1);
@ -92,69 +92,69 @@ public interface Constants {
}; };
/** Actions when an armed unit contacts a settlement. */ /** Actions when an armed unit contacts a settlement. */
public static enum ArmedUnitSettlementAction { enum ArmedUnitSettlementAction {
SETTLEMENT_ATTACK, SETTLEMENT_ATTACK,
SETTLEMENT_TRIBUTE, SETTLEMENT_TRIBUTE,
} }
/** Actions when dealing with a boycott. */ /** Actions when dealing with a boycott. */
public static enum BoycottAction { enum BoycottAction {
BOYCOTT_PAY_ARREARS, BOYCOTT_PAY_ARREARS,
BOYCOTT_DUMP_CARGO BOYCOTT_DUMP_CARGO
} }
/** Actions when claiming land. */ /** Actions when claiming land. */
public static enum ClaimAction { enum ClaimAction {
CLAIM_ACCEPT, CLAIM_ACCEPT,
CLAIM_STEAL CLAIM_STEAL
} }
/** Actions surrounding native demands at colonies. */ /** Actions surrounding native demands at colonies. */
public static enum IndianDemandAction { enum IndianDemandAction {
INDIAN_DEMAND_ACCEPT, INDIAN_DEMAND_ACCEPT,
INDIAN_DEMAND_REJECT, INDIAN_DEMAND_REJECT,
INDIAN_DEMAND_DONE INDIAN_DEMAND_DONE
} }
/** Actions with a missionary at a native settlement. */ /** Actions with a missionary at a native settlement. */
public static enum MissionaryAction { enum MissionaryAction {
MISSIONARY_ESTABLISH_MISSION, MISSIONARY_ESTABLISH_MISSION,
MISSIONARY_DENOUNCE_HERESY, MISSIONARY_DENOUNCE_HERESY,
MISSIONARY_INCITE_INDIANS MISSIONARY_INCITE_INDIANS
} }
/** Actions in scouting a colony. */ /** Actions in scouting a colony. */
public static enum ScoutColonyAction { enum ScoutColonyAction {
SCOUT_COLONY_NEGOTIATE, SCOUT_COLONY_NEGOTIATE,
SCOUT_COLONY_SPY, SCOUT_COLONY_SPY,
SCOUT_COLONY_ATTACK SCOUT_COLONY_ATTACK
} }
/** Actions in scouting a native settlement. */ /** Actions in scouting a native settlement. */
public static enum ScoutIndianSettlementAction { enum ScoutIndianSettlementAction {
SCOUT_SETTLEMENT_SPEAK, SCOUT_SETTLEMENT_SPEAK,
SCOUT_SETTLEMENT_TRIBUTE, SCOUT_SETTLEMENT_TRIBUTE,
SCOUT_SETTLEMENT_ATTACK SCOUT_SETTLEMENT_ATTACK
} }
/** Price used to denote claiming land by stealing it. */ /** Price used to denote claiming land by stealing it. */
public static final int STEAL_LAND = -1; int STEAL_LAND = -1;
/** Choice of sales action at a native settlement. */ /** Choice of sales action at a native settlement. */
public static enum TradeAction { enum TradeAction {
BUY, BUY,
SELL, SELL,
GIFT GIFT
} }
/** Actions when buying from the natives. */ /** Actions when buying from the natives. */
public static enum TradeBuyAction { enum TradeBuyAction {
BUY, BUY,
HAGGLE HAGGLE
} }
/** Actions when selling to the natives. */ /** Actions when selling to the natives. */
public static enum TradeSellAction { enum TradeSellAction {
SELL, SELL,
HAGGLE, HAGGLE,
GIFT GIFT

View File

@ -33,39 +33,39 @@ import java.util.stream.Stream;
public interface Consumer { public interface Consumer {
/** Compare consumers by descending priority. */ /** Compare consumers by descending priority. */
public static final Comparator<Consumer> COMPARATOR Comparator<Consumer> COMPARATOR
= Comparator.comparingInt(Consumer::getPriority).reversed(); = Comparator.comparingInt(Consumer::getPriority).reversed();
/** /**
* Default consumption priority for the Colony when producing new * Default consumption priority for the Colony when producing new
* colonists (from food). * colonists (from food).
*/ */
public static final int POPULATION_PRIORITY = 300; int POPULATION_PRIORITY = 300;
/** /**
* The consumption priority of the colony build queue. * The consumption priority of the colony build queue.
*/ */
public static final int COLONY_PRIORITY = 500; int COLONY_PRIORITY = 500;
/** /**
* Default consumption priority for buildings. Individual building * Default consumption priority for buildings. Individual building
* types may have different priorities. * types may have different priorities.
*/ */
public static final int BUILDING_PRIORITY = 800; int BUILDING_PRIORITY = 800;
/** /**
* Default consumption priority for units. Individual unit types * Default consumption priority for units. Individual unit types
* may have different priorities. Slave units, or converts, or * may have different priorities. Slave units, or converts, or
* petty criminals, for example, might have a lower priority. * petty criminals, for example, might have a lower priority.
*/ */
public static final int UNIT_PRIORITY = 1000; int UNIT_PRIORITY = 1000;
/** /**
* Returns a list of GoodsTypes this Consumer consumes. * Returns a list of GoodsTypes this Consumer consumes.
* *
* @return a {@code List} value * @return a {@code List} value
*/ */
public List<AbstractGoods> getConsumedGoods(); List<AbstractGoods> getConsumedGoods();
/** /**
* The priority of this Consumer. The higher the priority, the * The priority of this Consumer. The higher the priority, the
@ -74,7 +74,7 @@ public interface Consumer {
* *
* @return an {@code int} value * @return an {@code int} value
*/ */
public int getPriority(); int getPriority();
/** /**
* Get the modifier set with the given id. The modifier most * Get the modifier set with the given id. The modifier most
@ -85,5 +85,5 @@ public interface Consumer {
* @param id The object identifier. * @param id The object identifier.
* @return The stream of {@code Modifier}s found. * @return The stream of {@code Modifier}s found.
*/ */
public Stream<Modifier> getConsumptionModifiers(String id); Stream<Modifier> getConsumptionModifiers(String id);
} }

View File

@ -42,7 +42,7 @@ public class DiplomaticTrade extends FreeColGameObject {
public static final String TAG = "diplomaticTrade"; public static final String TAG = "diplomaticTrade";
/** A context for the trade. */ /** A context for the trade. */
public static enum TradeContext { public enum TradeContext {
CONTACT, /** First contact between Europeans */ CONTACT, /** First contact between Europeans */
DIPLOMATIC, /** Scout negotiating */ DIPLOMATIC, /** Scout negotiating */
TRADE, /** Carrier trading */ TRADE, /** Carrier trading */
@ -59,7 +59,7 @@ public class DiplomaticTrade extends FreeColGameObject {
} }
/** A type for the trade status. */ /** A type for the trade status. */
public static enum TradeStatus { public enum TradeStatus {
PROPOSE_TRADE, PROPOSE_TRADE,
ACCEPT_TRADE, ACCEPT_TRADE,
REJECT_TRADE REJECT_TRADE

View File

@ -44,7 +44,7 @@ public enum Direction implements Named {
W (-1, 0, -1, 0), W (-1, 0, -1, 0),
NW ( 0, -1, -1, -1); NW ( 0, -1, -1, -1);
public final static int NUMBER_OF_DIRECTIONS = values().length; public static final int NUMBER_OF_DIRECTIONS = values().length;
public static final List<Direction> allDirections public static final List<Direction> allDirections
= makeUnmodifiableList(Direction.N, Direction.NE, = makeUnmodifiableList(Direction.N, Direction.NE,

View File

@ -45,7 +45,7 @@ public class Disaster extends FreeColSpecObjectType {
public static final String BANKRUPTCY = "model.disaster.bankruptcy"; public static final String BANKRUPTCY = "model.disaster.bankruptcy";
/** Whether to apply one, many or all applicable disasters. */ /** Whether to apply one, many or all applicable disasters. */
public static enum Effects { ONE, SEVERAL, ALL }; public enum Effects { ONE, SEVERAL, ALL };
/** Whether this disaster is natural. Defaults to false. */ /** Whether this disaster is natural. Defaults to false. */

View File

@ -80,7 +80,7 @@ public class Europe extends UnitLocation
* The following constant should be used when the random choice * The following constant should be used when the random choice
* behaviour is desired. * behaviour is desired.
*/ */
public static enum MigrationType { public enum MigrationType {
NORMAL, // Unit decided to migrate NORMAL, // Unit decided to migrate
RECRUIT, // Player is paying RECRUIT, // Player is paying
FOUNTAIN, // As a result of a Fountain of Youth discovery FOUNTAIN, // As a result of a Fountain of Youth discovery

View File

@ -41,7 +41,7 @@ public class FoundingFather extends FreeColSpecObjectType {
public static final String TAG = "founding-father"; public static final String TAG = "founding-father";
public static enum FoundingFatherType { public enum FoundingFatherType {
TRADE, TRADE,
EXPLORATION, EXPLORATION,
MILITARY, MILITARY,

View File

@ -33,14 +33,14 @@ public interface FreeColGameObjectListener {
* @param id The object identifier. * @param id The object identifier.
* @param fcgo The new {@code FreeColGameObject}. * @param fcgo The new {@code FreeColGameObject}.
*/ */
public void setFreeColGameObject(String id, FreeColGameObject fcgo); void setFreeColGameObject(String id, FreeColGameObject fcgo);
/** /**
* Notify a listener (if any) of that an object has gone. * Notify a listener (if any) of that an object has gone.
* *
* @param id The object identifier. * @param id The object identifier.
*/ */
public void removeFreeColGameObject(String id); void removeFreeColGameObject(String id);
/** /**
* Notify a listener (if any) of that an object has changed owner. * Notify a listener (if any) of that an object has changed owner.
@ -49,6 +49,6 @@ public interface FreeColGameObjectListener {
* @param oldOwner The old owning {@code Player}. * @param oldOwner The old owning {@code Player}.
* @param newOwner The new owning {@code Player}. * @param newOwner The new owning {@code Player}.
*/ */
public void ownerChanged(FreeColGameObject source, void ownerChanged(FreeColGameObject source,
Player oldOwner, Player newOwner); Player oldOwner, Player newOwner);
} }

View File

@ -73,7 +73,7 @@ public class Game extends FreeColGameObject {
public static final String TAG = "game"; public static final String TAG = "game";
/** Reasons for logging out. */ /** Reasons for logging out. */
public static enum LogoutReason { public enum LogoutReason {
DEFEATED, // Game over, player lost DEFEATED, // Game over, player lost
LOGIN, // Logging in again FIXME: this should go away LOGIN, // Logging in again FIXME: this should go away
LOGOUT, // Player quits but game continues LOGOUT, // Player quits but game continues
@ -84,7 +84,7 @@ public class Game extends FreeColGameObject {
}; };
/** State for the FCGO iterator, out here because it has to be static. */ /** State for the FCGO iterator, out here because it has to be static. */
private static enum FcgoState { private enum FcgoState {
INVALID, INVALID,
VALID, VALID,
CONSUMED, CONSUMED,

View File

@ -68,7 +68,7 @@ public class HighScore extends FreeColObject {
* On retirement, an object will be named in honour of the * On retirement, an object will be named in honour of the
* player. The nature of the object depends on the player's score. * player. The nature of the object depends on the player's score.
*/ */
public static enum ScoreLevel { public enum ScoreLevel {
CONTINENT(40000), CONTINENT(40000),
COUNTRY(35000), COUNTRY(35000),
STATE(30000), STATE(30000),

View File

@ -35,7 +35,7 @@ public class HistoryEvent extends StringTemplate {
public static final String TAG = "historyEvent"; public static final String TAG = "historyEvent";
public static enum HistoryEventType implements Named { public enum HistoryEventType implements Named {
DISCOVER_NEW_WORLD, DISCOVER_NEW_WORLD,
DISCOVER_REGION, DISCOVER_REGION,
MEET_NATION, MEET_NATION,

View File

@ -69,7 +69,7 @@ public class IndianSettlement extends Settlement implements TradeLocation {
public static final String TAG = "indianSettlement"; public static final String TAG = "indianSettlement";
/** The level of contact between a player and this settlement. */ /** The level of contact between a player and this settlement. */
public static enum ContactLevel { public enum ContactLevel {
UNCONTACTED, // Nothing known other than location? UNCONTACTED, // Nothing known other than location?
CONTACTED, // Name, wanted-goods now visible CONTACTED, // Name, wanted-goods now visible
VISITED, // Skill now known VISITED, // Skill now known

View File

@ -39,7 +39,7 @@ public final class Limit extends FreeColSpecObjectType {
public static final String TAG = "limit"; public static final String TAG = "limit";
/** The basic operation used in evaluating this limit. */ /** The basic operation used in evaluating this limit. */
public static enum Operator { public enum Operator {
EQ, LT, GT, LE, GE EQ, LT, GT, LE, GE
} }

View File

@ -30,7 +30,7 @@ public interface Locatable {
* *
* @return The location of this {@code Locatable}. * @return The location of this {@code Locatable}.
*/ */
public Location getLocation(); Location getLocation();
/** /**
* Sets the location for this {@code Locatable}. * Sets the location for this {@code Locatable}.
@ -39,14 +39,14 @@ public interface Locatable {
* {@code Locatable}. * {@code Locatable}.
* @return True if the location change succeeds. * @return True if the location change succeeds.
*/ */
public boolean setLocation(Location newLocation); boolean setLocation(Location newLocation);
/** /**
* Is this locatable in Europe. * Is this locatable in Europe.
* *
* @return True if the {@code Locatable} is in {@code Europe}. * @return True if the {@code Locatable} is in {@code Europe}.
*/ */
public boolean isInEurope(); boolean isInEurope();
/** /**
* Get the {@code Tile} where this {@code Locatable} is * Get the {@code Tile} where this {@code Locatable} is
@ -55,7 +55,7 @@ public interface Locatable {
* @return The {@code Tile} where this {@code Locatable} * @return The {@code Tile} where this {@code Locatable}
* is located, if any. * is located, if any.
*/ */
public Tile getTile(); Tile getTile();
/** /**
* Gets the number of cargo slots consumed when this * Gets the number of cargo slots consumed when this
@ -63,5 +63,5 @@ public interface Locatable {
* *
* @return The number of cargo slots required. * @return The number of cargo slots required.
*/ */
public int getSpaceTaken(); int getSpaceTaken();
} }

View File

@ -35,9 +35,9 @@ public interface Location extends ObjectWithId {
// "Rank" constants for location ordering. // "Rank" constants for location ordering.
// Tile ranks are distinct and non-negative. // Tile ranks are distinct and non-negative.
// Other locations devolve to {europe,highseas,tile} rank. // Other locations devolve to {europe,highseas,tile} rank.
public static final int LOCATION_RANK_NOWHERE = -3; int LOCATION_RANK_NOWHERE = -3;
public static final int LOCATION_RANK_EUROPE = -2; int LOCATION_RANK_EUROPE = -2;
public static final int LOCATION_RANK_HIGHSEAS = -1; int LOCATION_RANK_HIGHSEAS = -1;
/** /**
* Gets the identifier of this {@code Location}. * Gets the identifier of this {@code Location}.
@ -46,21 +46,21 @@ public interface Location extends ObjectWithId {
* @see FreeColGameObject#getId * @see FreeColGameObject#getId
*/ */
@Override @Override
public String getId(); String getId();
/** /**
* Gets the Tile associated with this Location. * Gets the Tile associated with this Location.
* *
* @return The Tile associated with this Location, or null if none found. * @return The Tile associated with this Location, or null if none found.
*/ */
public Tile getTile(); Tile getTile();
/** /**
* Get a label for this location. * Get a label for this location.
* *
* @return A label for this location. * @return A label for this location.
*/ */
public StringTemplate getLocationLabel(); StringTemplate getLocationLabel();
/** /**
* Get a label for this location for a particular player. * Get a label for this location for a particular player.
@ -68,7 +68,7 @@ public interface Location extends ObjectWithId {
* @param player The {@code Player} to return the name for. * @param player The {@code Player} to return the name for.
* @return A label for this location. * @return A label for this location.
*/ */
public StringTemplate getLocationLabelFor(Player player); StringTemplate getLocationLabelFor(Player player);
/** /**
* Adds a {@code Locatable} to this Location. * Adds a {@code Locatable} to this Location.
@ -76,7 +76,7 @@ public interface Location extends ObjectWithId {
* @param locatable The {@code Locatable} to add to this Location. * @param locatable The {@code Locatable} to add to this Location.
* @return True if the locatable was added. * @return True if the locatable was added.
*/ */
public boolean add(Locatable locatable); boolean add(Locatable locatable);
/** /**
* Removes a {@code Locatable} from this Location. * Removes a {@code Locatable} from this Location.
@ -85,7 +85,7 @@ public interface Location extends ObjectWithId {
* Location. * Location.
* @return True if the locatable was removed. * @return True if the locatable was removed.
*/ */
public boolean remove(Locatable locatable); boolean remove(Locatable locatable);
/** /**
* Checks if this {@code Location} contains the specified * Checks if this {@code Location} contains the specified
@ -94,7 +94,7 @@ public interface Location extends ObjectWithId {
* @param locatable The {@code Locatable} to test the presence of. * @param locatable The {@code Locatable} to test the presence of.
* @return True if the locatable is present at this location. * @return True if the locatable is present at this location.
*/ */
public boolean contains(Locatable locatable); boolean contains(Locatable locatable);
/** /**
* Checks whether or not the specified locatable may be added to this * Checks whether or not the specified locatable may be added to this
@ -103,28 +103,28 @@ public interface Location extends ObjectWithId {
* @param locatable The {@code Locatable} to add. * @param locatable The {@code Locatable} to add.
* @return True if the locatable can be added to this location. * @return True if the locatable can be added to this location.
*/ */
public boolean canAdd(Locatable locatable); boolean canAdd(Locatable locatable);
/** /**
* Gets the number of units at this Location. * Gets the number of units at this Location.
* *
* @return The number of units at this Location. * @return The number of units at this Location.
*/ */
public int getUnitCount(); int getUnitCount();
/** /**
* Gets a stream of all the units present at this location. * Gets a stream of all the units present at this location.
* *
* @return A stream of all the units at this location. * @return A stream of all the units at this location.
*/ */
public Stream<Unit> getUnits(); Stream<Unit> getUnits();
/** /**
* Gets a list of all the units present at this location. * Gets a list of all the units present at this location.
* *
* @return A list of all the units at this location. * @return A list of all the units at this location.
*/ */
public List<Unit> getUnitList(); List<Unit> getUnitList();
/** /**
* Gets the {@code GoodsContainer} this {@code Location} use * Gets the {@code GoodsContainer} this {@code Location} use
@ -133,7 +133,7 @@ public interface Location extends ObjectWithId {
* @return The {@code GoodsContainer} or {@code null} if the * @return The {@code GoodsContainer} or {@code null} if the
* {@code Location} cannot store any goods. * {@code Location} cannot store any goods.
*/ */
public GoodsContainer getGoodsContainer(); GoodsContainer getGoodsContainer();
/** /**
* Gets the {@code Settlement} this {@code Location} is * Gets the {@code Settlement} this {@code Location} is
@ -141,7 +141,7 @@ public interface Location extends ObjectWithId {
* *
* @return The associated {@code Settlement}, or null if none. * @return The associated {@code Settlement}, or null if none.
*/ */
public Settlement getSettlement(); Settlement getSettlement();
/** /**
* Get the colony at this location. * Get the colony at this location.
@ -149,7 +149,7 @@ public interface Location extends ObjectWithId {
* @return A {@code Colony} at this location if any, or null * @return A {@code Colony} at this location if any, or null
* if none found. * if none found.
*/ */
public Colony getColony(); Colony getColony();
/** /**
* Gets the native settlement at this location. * Gets the native settlement at this location.
@ -157,7 +157,7 @@ public interface Location extends ObjectWithId {
* @return The {@code IndianSettlement} at this location if * @return The {@code IndianSettlement} at this location if
* any, or null if none found. * any, or null if none found.
*/ */
public IndianSettlement getIndianSettlement(); IndianSettlement getIndianSettlement();
/** /**
* Promote this location to a more meaningful one if possible. * Promote this location to a more meaningful one if possible.
@ -167,7 +167,7 @@ public interface Location extends ObjectWithId {
* *
* @return A more meaningful {@code Location}, or this one. * @return A more meaningful {@code Location}, or this one.
*/ */
public Location up(); Location up();
/** /**
* Get a integer for this location, for the benefit of location * Get a integer for this location, for the benefit of location
@ -175,14 +175,14 @@ public interface Location extends ObjectWithId {
* *
* @return A suitable integer. * @return A suitable integer.
*/ */
public int getRank(); int getRank();
/** /**
* Get a short description of this location. * Get a short description of this location.
* *
* @return A short description. * @return A short description.
*/ */
public String toShortString(); String toShortString();
/** /**
@ -191,7 +191,7 @@ public interface Location extends ObjectWithId {
* @param loc The {@code Location} to improve. * @param loc The {@code Location} to improve.
* @return The improved {@code Location}. * @return The improved {@code Location}.
*/ */
public static Location upLoc(Location loc) { static Location upLoc(Location loc) {
return (loc == null) ? null : loc.up(); return (loc == null) ? null : loc.up();
} }
@ -201,7 +201,7 @@ public interface Location extends ObjectWithId {
* @param loc A {@code Location} to check. * @param loc A {@code Location} to check.
* @return The integer rank of the given location. * @return The integer rank of the given location.
*/ */
public static int rankOf(Location loc) { static int rankOf(Location loc) {
return (loc == null) ? Location.LOCATION_RANK_NOWHERE : loc.getRank(); return (loc == null) ? Location.LOCATION_RANK_NOWHERE : loc.getRank();
} }
@ -210,7 +210,7 @@ public interface Location extends ObjectWithId {
* *
* @return A key for image lookup, null by default. * @return A key for image lookup, null by default.
*/ */
public default String getLocationImageKey() { default String getLocationImageKey() {
return null; return null;
} }
} }

View File

@ -56,7 +56,7 @@ public class LostCityRumour extends TileItem {
private static int rumourNothing = -1; private static int rumourNothing = -1;
/** Constants describing types of Lost City Rumours. */ /** Constants describing types of Lost City Rumours. */
public static enum RumourType { public enum RumourType {
NO_SUCH_RUMOUR, NO_SUCH_RUMOUR,
BURIAL_GROUND, BURIAL_GROUND,
EXPEDITION_VANISHES, EXPEDITION_VANISHES,

View File

@ -84,19 +84,19 @@ public class Map extends FreeColGameObject implements Location, Iterable<Tile> {
* Possible actions by the unit travelling along a path in consideration * Possible actions by the unit travelling along a path in consideration
* of the next tile. * of the next tile.
*/ */
private static enum MoveStep { FAIL, BYLAND, BYWATER, EMBARK, DISEMBARK }; private enum MoveStep { FAIL, BYLAND, BYWATER, EMBARK, DISEMBARK };
/** /**
* The number of tiles from the upper edge that are considered * The number of tiles from the upper edge that are considered
* polar by default. * polar by default.
*/ */
public final static int POLAR_HEIGHT = 2; public static final int POLAR_HEIGHT = 2;
/** /**
* The layers included in the map. The RIVERS layer includes all * The layers included in the map. The RIVERS layer includes all
* natural tile improvements that are not resources. * natural tile improvements that are not resources.
*/ */
public static enum Layer { public enum Layer {
NONE, LAND, TERRAIN, REGIONS, RIVERS, RESOURCES, RUMOURS, NATIVES, ALL; NONE, LAND, TERRAIN, REGIONS, RIVERS, RESOURCES, RUMOURS, NATIVES, ALL;
}; };

View File

@ -56,7 +56,7 @@ public final class Market extends FreeColGameObject implements Ownable {
* Constant for specifying the access to this {@code Market} * Constant for specifying the access to this {@code Market}
* when selling goods. * when selling goods.
*/ */
public static enum Access { public enum Access {
EUROPE, EUROPE,
CUSTOM_HOUSE, CUSTOM_HOUSE,
} }

View File

@ -47,7 +47,7 @@ public class ModelMessage extends StringTemplate {
* When this changes, be sure to update client-options.xml and the * When this changes, be sure to update client-options.xml and the
* messages file appropriately. * messages file appropriately.
*/ */
public static enum MessageType implements Named { public enum MessageType implements Named {
DEFAULT(""), DEFAULT(""),
BUILDING_COMPLETED("model.option.guiShowBuildingCompleted"), BUILDING_COMPLETED("model.option.guiShowBuildingCompleted"),
COMBAT_RESULT(null), // No option, always display COMBAT_RESULT(null), // No option, always display
@ -284,7 +284,7 @@ public class ModelMessage extends StringTemplate {
* @param source The source object * @param source The source object
* @return An object to be displayed for the message. * @return An object to be displayed for the message.
*/ */
static private FreeColObject getDefaultDisplay(MessageType messageType, private static FreeColObject getDefaultDisplay(MessageType messageType,
FreeColGameObject source) { FreeColGameObject source) {
FreeColObject o = null; FreeColObject o = null;
switch (messageType) { switch (messageType) {

View File

@ -161,7 +161,7 @@ public class Modifier extends Feature {
public static final int ROLE_COMBAT_INDEX = 30; public static final int ROLE_COMBAT_INDEX = 30;
public static final int GENERAL_COMBAT_INDEX = 50; public static final int GENERAL_COMBAT_INDEX = 50;
public static enum ModifierType { public enum ModifierType {
ADDITIVE, ADDITIVE,
MULTIPLICATIVE, MULTIPLICATIVE,
PERCENTAGE PERCENTAGE

View File

@ -54,7 +54,7 @@ public final class Monarch extends FreeColGameObject implements Named {
public static final String TAG = "monarch"; public static final String TAG = "monarch";
/** Constants describing monarch actions. */ /** Constants describing monarch actions. */
public static enum MonarchAction { public enum MonarchAction {
NO_ACTION, NO_ACTION,
RAISE_TAX_ACT, RAISE_TAX_ACT,
RAISE_TAX_WAR, RAISE_TAX_WAR,

View File

@ -31,7 +31,7 @@ public interface Movable {
* *
* @return The amount of moves this Movable has left. * @return The amount of moves this Movable has left.
*/ */
public int getMovesLeft(); int getMovesLeft();
/** /**
* Gets the amount of moves this Movable has at the beginning of * Gets the amount of moves this Movable has at the beginning of
@ -40,5 +40,5 @@ public interface Movable {
* @return The amount of moves this Movable has at the beginning * @return The amount of moves this Movable has at the beginning
* of each turn. * of each turn.
*/ */
public int getInitialMovesLeft(); int getInitialMovesLeft();
} }

View File

@ -30,13 +30,13 @@ public interface Nameable {
* *
* @return The name of the {@code Nameable}. * @return The name of the {@code Nameable}.
*/ */
public String getName(); String getName();
/** /**
* Sets the name for this {@code Nameable}. * Sets the name for this {@code Nameable}.
* *
* @param newName The new name for the {@code Nameable}. * @param newName The new name for the {@code Nameable}.
*/ */
public void setName(String newName); void setName(String newName);
} }

View File

@ -33,5 +33,5 @@ public interface Named {
* *
* @return The name of the {@code Named}. * @return The name of the {@code Named}.
*/ */
public String getNameKey(); String getNameKey();
} }

View File

@ -43,7 +43,7 @@ public class NationOptions extends FreeColSpecObject {
public static final String TAG = "nationOptions"; public static final String TAG = "nationOptions";
/** Type of national advantages for European players. */ /** Type of national advantages for European players. */
public static enum Advantages implements Named { public enum Advantages implements Named {
NONE, NONE,
FIXED, FIXED,
SELECTABLE; SELECTABLE;
@ -76,7 +76,7 @@ public class NationOptions extends FreeColSpecObject {
* Nations may be available to all players, to AI players only, or * Nations may be available to all players, to AI players only, or
* to no players. * to no players.
*/ */
public static enum NationState implements Named { public enum NationState implements Named {
AVAILABLE, AVAILABLE,
AI_ONLY, AI_ONLY,
NOT_AVAILABLE; NOT_AVAILABLE;

View File

@ -36,7 +36,7 @@ import static net.sf.freecol.common.util.StringUtils.*;
*/ */
public abstract class NationType extends FreeColSpecObjectType { public abstract class NationType extends FreeColSpecObjectType {
public static enum SettlementNumber { public enum SettlementNumber {
LOW, AVERAGE, HIGH; LOW, AVERAGE, HIGH;
/** /**
@ -49,7 +49,7 @@ public abstract class NationType extends FreeColSpecObjectType {
} }
} }
public static enum AggressionLevel { public enum AggressionLevel {
LOW, AVERAGE, HIGH; LOW, AVERAGE, HIGH;
/** /**

View File

@ -46,7 +46,7 @@ public class NativeTrade extends FreeColGameObject {
= StringTemplate.template(""); = StringTemplate.template("");
/** The type of native trade command. */ /** The type of native trade command. */
public static enum NativeTradeAction { public enum NativeTradeAction {
// Requests from European trader // Requests from European trader
OPEN(false, true), // Start a new trade session OPEN(false, true), // Start a new trade session
CLOSE(true, true), // End an existing session CLOSE(true, true), // End an existing session

View File

@ -50,11 +50,11 @@ public class Operand extends Scope {
private static final Logger logger = Logger.getLogger(Operand.class.getName()); private static final Logger logger = Logger.getLogger(Operand.class.getName());
public static enum OperandType { public enum OperandType {
UNITS, BUILDINGS, SETTLEMENTS, FOUNDING_FATHERS, YEAR, OPTION, NONE UNITS, BUILDINGS, SETTLEMENTS, FOUNDING_FATHERS, YEAR, OPTION, NONE
} }
public static enum ScopeLevel { public enum ScopeLevel {
SETTLEMENT, PLAYER, GAME, NONE SETTLEMENT, PLAYER, GAME, NONE
} }

View File

@ -32,7 +32,7 @@ public interface Ownable {
* *
* @return The {@code Player} controlling this {@code Ownable}. * @return The {@code Player} controlling this {@code Ownable}.
*/ */
public Player getOwner(); Player getOwner();
/** /**
* Sets the owner of this {@code Ownable}. * Sets the owner of this {@code Ownable}.
@ -41,5 +41,5 @@ public interface Ownable {
* of this {@code Ownable}. * of this {@code Ownable}.
* @exception UnsupportedOperationException if not implemented. * @exception UnsupportedOperationException if not implemented.
*/ */
public void setOwner(Player p); void setOwner(Player p);
} }

View File

@ -96,12 +96,12 @@ public class Player extends FreeColGameObject implements Nameable {
// //
/** Types of players. */ /** Types of players. */
public static enum PlayerType { public enum PlayerType {
NATIVE, COLONIAL, REBEL, INDEPENDENT, ROYAL, UNDEAD, RETIRED NATIVE, COLONIAL, REBEL, INDEPENDENT, ROYAL, UNDEAD, RETIRED
} }
/** Colony value categories. */ /** Colony value categories. */
public static enum ColonyValueCategory { public enum ColonyValueCategory {
A_OVERRIDE, // override slot containing showstopper NoValueType values A_OVERRIDE, // override slot containing showstopper NoValueType values
A_PROD, // general production level A_PROD, // general production level
A_TILE, // strangeness with the tile A_TILE, // strangeness with the tile
@ -127,7 +127,7 @@ public class Player extends FreeColGameObject implements Nameable {
} }
/** Special return values for showstopper getColonyValue fail. */ /** Special return values for showstopper getColonyValue fail. */
public static enum NoValueType { public enum NoValueType {
BOGUS(-1), // bad value from canClaimToFoundSettlementReason BOGUS(-1), // bad value from canClaimToFoundSettlementReason
TERRAIN(-2), // can not settle on tile (e.g. moutain, water) TERRAIN(-2), // can not settle on tile (e.g. moutain, water)
RUMOUR(-3), // LCR present RUMOUR(-3), // LCR present
@ -3341,7 +3341,7 @@ public class Player extends FreeColGameObject implements Nameable {
* to found a settlement or just to be used by one, including the * to found a settlement or just to be used by one, including the
* double negative NONE == "no reason" case. * double negative NONE == "no reason" case.
*/ */
public static enum NoClaimReason implements Named { public enum NoClaimReason implements Named {
NONE, // Actually, tile can be claimed NONE, // Actually, tile can be claimed
TERRAIN, // Not on settleable terrain TERRAIN, // Not on settleable terrain
RUMOUR, // Europeans can not claim tiles with LCR RUMOUR, // Europeans can not claim tiles with LCR

View File

@ -56,7 +56,7 @@ public class Region extends FreeColGameObject implements Nameable {
public static final String PACIFIC_KEY = "model.region.pacific"; public static final String PACIFIC_KEY = "model.region.pacific";
/** The type of region. */ /** The type of region. */
public static enum RegionType implements Named { public enum RegionType implements Named {
OCEAN(false), OCEAN(false),
COAST(false), COAST(false),
LAKE(false), LAKE(false),

View File

@ -91,7 +91,7 @@ public final class Specification implements OptionContainer {
// Special reader classes for spec objects // Special reader classes for spec objects
private interface ChildReader { private interface ChildReader {
public void readChildren(FreeColXMLReader xr) throws XMLStreamException; void readChildren(FreeColXMLReader xr) throws XMLStreamException;
} }
/** /**
@ -794,7 +794,7 @@ public final class Specification implements OptionContainer {
String agesValue = ""; String agesValue = "";
if (!badAges) { if (!badAges) {
agesValue = getText(GameOptions.AGES); agesValue = getText(GameOptions.AGES);
String a[] = agesValue.split(","); String[] a = agesValue.split(",");
badAges = a.length != NUMBER_OF_AGES-1; badAges = a.length != NUMBER_OF_AGES-1;
if (!badAges) { if (!badAges) {
try { try {

View File

@ -63,7 +63,7 @@ public class StringTemplate extends FreeColObject {
* value of the key, or LABEL, a separator string that will be * value of the key, or LABEL, a separator string that will be
* used to join the replacement values. * used to join the replacement values.
*/ */
public static enum TemplateType { NAME, KEY, TEMPLATE, LABEL } public enum TemplateType { NAME, KEY, TEMPLATE, LABEL }
/** The TemplateType of this StringTemplate. Defaults to KEY. */ /** The TemplateType of this StringTemplate. Defaults to KEY. */
private TemplateType templateType = TemplateType.KEY; private TemplateType templateType = TemplateType.KEY;

View File

@ -68,7 +68,7 @@ public class Tension implements Named {
/** /**
* Constants for describing alarm levels. * Constants for describing alarm levels.
*/ */
public static enum Level { public enum Level {
HAPPY(100), HAPPY(100),
CONTENT(600), CONTENT(600),
DISPLEASED(700), DISPLEASED(700),

View File

@ -45,7 +45,7 @@ public final class TileType extends FreeColSpecObjectType
public static final String TAG = "tile-type"; public static final String TAG = "tile-type";
public static enum RangeType { HUMIDITY, TEMPERATURE, ALTITUDE }; public enum RangeType { HUMIDITY, TEMPERATURE, ALTITUDE };
public static final int HILLS_ALTITUDE = 15; public static final int HILLS_ALTITUDE = 15;
public static final int MOUNTAINS_ALTITUDE = 25; public static final int MOUNTAINS_ALTITUDE = 25;

View File

@ -35,7 +35,7 @@ public interface TradeLocation {
* @param goodsType The {@code GoodsType} to check. * @param goodsType The {@code GoodsType} to check.
* @return The amount of goods present. * @return The amount of goods present.
*/ */
public int getAvailableGoodsCount(GoodsType goodsType); int getAvailableGoodsCount(GoodsType goodsType);
/** /**
* Gets the amount of a given goods type that can be exported from * Gets the amount of a given goods type that can be exported from
@ -45,7 +45,7 @@ public interface TradeLocation {
* @param turns The number of turns before the goods is required. * @param turns The number of turns before the goods is required.
* @return The amount of goods to export. * @return The amount of goods to export.
*/ */
public int getExportAmount(GoodsType goodsType, int turns); int getExportAmount(GoodsType goodsType, int turns);
/** /**
* Gets the amount of a given goods type that can be imported to * Gets the amount of a given goods type that can be imported to
@ -55,7 +55,7 @@ public interface TradeLocation {
* @param turns The number of turns before the goods will arrive. * @param turns The number of turns before the goods will arrive.
* @return The amount of goods to import. * @return The amount of goods to import.
*/ */
public int getImportAmount(GoodsType goodsType, int turns); int getImportAmount(GoodsType goodsType, int turns);
/** /**
* Function for returning the name of a TradeLocation * Function for returning the name of a TradeLocation
@ -63,7 +63,7 @@ public interface TradeLocation {
* @param tradeLocation The {@code TradeLocation} to return the name. * @param tradeLocation The {@code TradeLocation} to return the name.
* @return The name. * @return The name.
*/ */
public String getLocationName(TradeLocation tradeLocation); String getLocationName(TradeLocation tradeLocation);
/** /**
* Get the name of this instance as a JLabel. * Get the name of this instance as a JLabel.
@ -71,7 +71,7 @@ public interface TradeLocation {
* @return The {@code JLabel} with the result of * @return The {@code JLabel} with the result of
* {@link #getLocationName(TradeLocation)} * {@link #getLocationName(TradeLocation)}
*/ */
public default JLabel getNameAsJlabel() { default JLabel getNameAsJlabel() {
return new JLabel(getLocationName(this)); return new JLabel(getLocationName(this));
} }
@ -81,7 +81,7 @@ public interface TradeLocation {
* *
* @return True if possible, false by default. * @return True if possible, false by default.
*/ */
public default boolean canBeInput() { default boolean canBeInput() {
return false; return false;
} }
} }

View File

@ -33,7 +33,7 @@ public interface TransactionListener {
* @param amount The amount of goods which have been purchased * @param amount The amount of goods which have been purchased
* @param price The unit price of the goods * @param price The unit price of the goods
*/ */
public void logPurchase(GoodsType goodsType, int amount, int price); void logPurchase(GoodsType goodsType, int amount, int price);
/** /**
* Logs a sale * Logs a sale
@ -43,5 +43,5 @@ public interface TransactionListener {
* @param price The unit price of the goods * @param price The unit price of the goods
* @param tax The tax which has been applied * @param tax The tax which has been applied
*/ */
public void logSale(GoodsType goodsType, int amount, int price, int tax); void logSale(GoodsType goodsType, int amount, int price, int tax);
} }

View File

@ -189,7 +189,7 @@ public class Unit extends GoodsLocation
!u.isNaval() && u.getState() == UnitState.SENTRY; !u.isNaval() && u.getState() == UnitState.SENTRY;
/** A state a Unit can have. */ /** A state a Unit can have. */
public static enum UnitState { public enum UnitState {
ACTIVE, ACTIVE,
FORTIFIED, FORTIFIED,
SENTRY, SENTRY,
@ -209,7 +209,7 @@ public class Unit extends GoodsLocation
} }
/** Internal state for findIntermediatePort. */ /** Internal state for findIntermediatePort. */
private static enum PortMode { private enum PortMode {
LAKE, LAKE,
NO_HIGH_SEAS, NO_HIGH_SEAS,
BLOCKED, BLOCKED,
@ -387,7 +387,7 @@ public class Unit extends GoodsLocation
} }
/** What type of unit label do we want? */ /** What type of unit label do we want? */
public static enum UnitLabelType { public enum UnitLabelType {
PLAIN, // Just the basics PLAIN, // Just the basics
NATIONAL, // Add the nation NATIONAL, // Add the nation
FULL // Add the equipment and extras FULL // Add the equipment and extras
@ -2115,7 +2115,7 @@ public class Unit extends GoodsLocation
* *
* @see Unit#getMoveType(Direction) * @see Unit#getMoveType(Direction)
*/ */
public static enum MoveType { public enum MoveType {
MOVE(null, true), MOVE(null, true),
MOVE_HIGH_SEAS(null, true), MOVE_HIGH_SEAS(null, true),
EXPLORE_LOST_CITY_RUMOUR(null, true), EXPLORE_LOST_CITY_RUMOUR(null, true),

View File

@ -53,7 +53,7 @@ public abstract class UnitLocation extends FreeColGameObject implements Location
private static final Logger logger = Logger.getLogger(UnitLocation.class.getName()); private static final Logger logger = Logger.getLogger(UnitLocation.class.getName());
public static enum NoAddReason { public enum NoAddReason {
/** /**
* No reason why Locatable can not be added. * No reason why Locatable can not be added.
*/ */

View File

@ -154,7 +154,7 @@ public class CompoundMission extends AbstractMission {
// Serialization. // Serialization.
private final static String INDEX_TAG = "index"; private static final String INDEX_TAG = "index";
/** /**

View File

@ -34,7 +34,7 @@ import net.sf.freecol.common.model.Unit;
*/ */
public interface Mission { public interface Mission {
public static enum MissionState { enum MissionState {
/** /**
* Mission is in progress. * Mission is in progress.
*/ */
@ -61,7 +61,7 @@ public interface Mission {
* *
* @return a {@code MissionState} value * @return a {@code MissionState} value
*/ */
public MissionState doMission(); MissionState doMission();
/** /**
@ -72,7 +72,7 @@ public interface Mission {
* *
* @return a {@code boolean} value * @return a {@code boolean} value
*/ */
public boolean isValid(); boolean isValid();
/** /**
@ -80,7 +80,7 @@ public interface Mission {
* *
* @return an {@code Unit} value * @return an {@code Unit} value
*/ */
public Unit getUnit(); Unit getUnit();
/** /**
* This method writes an XML-representation of this object to * This method writes an XML-representation of this object to
@ -90,5 +90,5 @@ public interface Mission {
* @throws XMLStreamException if there are any problems writing * @throws XMLStreamException if there are any problems writing
* to the stream. * to the stream.
*/ */
public void toXML(FreeColXMLWriter xw) throws XMLStreamException; void toXML(FreeColXMLWriter xw) throws XMLStreamException;
} }

View File

@ -31,7 +31,7 @@ import net.sf.freecol.common.model.Unit;
*/ */
public interface CostDecider { public interface CostDecider {
public static final int ILLEGAL_MOVE = -1; int ILLEGAL_MOVE = -1;
/** /**
* Determines the cost of a single move. * Determines the cost of a single move.
@ -45,7 +45,7 @@ public interface CostDecider {
* @return The cost of moving the given unit from the * @return The cost of moving the given unit from the
* {@code oldLocation} to the {@code newLocation}. * {@code oldLocation} to the {@code newLocation}.
*/ */
public int getCost(Unit unit, Location oldLocation, Location newLocation, int getCost(Unit unit, Location oldLocation, Location newLocation,
int movesLeftBefore); int movesLeftBefore);
/** /**
@ -54,13 +54,13 @@ public interface CostDecider {
* *
* @return The number of moves left. * @return The number of moves left.
*/ */
public int getMovesLeft(); int getMovesLeft();
/** /**
* Gets the number of turns consumed. * Gets the number of turns consumed.
* This method should be called after invoking {@link #getCost}. * This method should be called after invoking {@link #getCost}.
* *
* @return The number of turns consumed. * @return The number of turns consumed.
*/ */
public int getNewTurns(); int getNewTurns();
} }

View File

@ -47,7 +47,7 @@ public interface GoalDecider {
* @return The {@code PathNode} where the {@code Tile} * @return The {@code PathNode} where the {@code Tile}
* returned by {@code pathNode.getTile()} is the goal. * returned by {@code pathNode.getTile()} is the goal.
*/ */
public PathNode getGoal(); PathNode getGoal();
/** /**
* Determines whether this {@code GoalDecider} has any * Determines whether this {@code GoalDecider} has any
@ -56,7 +56,7 @@ public interface GoalDecider {
* @return {@code true} if there are any sub goals * @return {@code true} if there are any sub goals
* and {@code false} otherwise. * and {@code false} otherwise.
*/ */
public boolean hasSubGoals(); boolean hasSubGoals();
/** /**
* Checks whether the given {@code PathNode} is a * Checks whether the given {@code PathNode} is a
@ -74,5 +74,5 @@ public interface GoalDecider {
* {@code true} and {@link #hasSubGoals()} returns * {@code true} and {@link #hasSubGoals()} returns
* {@code false}. * {@code false}.
*/ */
public boolean check(Unit u, PathNode pathNode); boolean check(Unit u, PathNode pathNode);
} }

View File

@ -56,7 +56,7 @@ import net.sf.freecol.common.option.GameOptions;
* Calculates the production for a building of a given type. * Calculates the production for a building of a given type.
*/ */
public class BuildingProductionCalculator { public class BuildingProductionCalculator {
private final static double EPSILON = 0.0001; private static final double EPSILON = 0.0001;
private Player owner; private Player owner;

View File

@ -60,7 +60,7 @@ public abstract class Message {
* A map of message name to message constructors, built on the fly * A map of message name to message constructors, built on the fly
* as new messages are encountered and suitable constructors found. * as new messages are encountered and suitable constructors found.
*/ */
private final static Map<String, Constructor<? extends Message>> builders private static final Map<String, Constructor<? extends Message>> builders
= Collections.synchronizedMap(new HashMap<String, = Collections.synchronizedMap(new HashMap<String,
Constructor<? extends Message>>()); Constructor<? extends Message>>());
@ -70,7 +70,7 @@ public abstract class Message {
// Convenient way to specify the relative priorities of the messages // Convenient way to specify the relative priorities of the messages
// types in one place. // types in one place.
public static enum MessagePriority { public enum MessagePriority {
ATTRIBUTE(-1), // N/A ATTRIBUTE(-1), // N/A
ANIMATION(0), // Do animations first ANIMATION(0), // Do animations first
REMOVE(100), // Do removes last REMOVE(100), // Do removes last
@ -114,14 +114,14 @@ public abstract class Message {
* *
* @return The message tag. * @return The message tag.
*/ */
abstract public String getType(); public abstract String getType();
/** /**
* Set the message tag. * Set the message tag.
* *
* @param type The new message tag. * @param type The new message tag.
*/ */
abstract protected void setType(String type); protected abstract void setType(String type);
/** /**
* Checks if an attribute is present in this message. * Checks if an attribute is present in this message.
@ -129,7 +129,7 @@ public abstract class Message {
* @param key The attribute to look for. * @param key The attribute to look for.
* @return True if the attribute is present. * @return True if the attribute is present.
*/ */
abstract protected boolean hasAttribute(String key); protected abstract boolean hasAttribute(String key);
/** /**
* Get a string attribute value. * Get a string attribute value.
@ -137,7 +137,7 @@ public abstract class Message {
* @param key The attribute to look for. * @param key The attribute to look for.
* @return The string value found, or null if the attribute was absent. * @return The string value found, or null if the attribute was absent.
*/ */
abstract protected String getStringAttribute(String key); protected abstract String getStringAttribute(String key);
/** /**
* Sets an attribute in this message. * Sets an attribute in this message.
@ -145,35 +145,35 @@ public abstract class Message {
* @param key The attribute to set. * @param key The attribute to set.
* @param value The new value of the attribute. * @param value The new value of the attribute.
*/ */
abstract protected void setStringAttribute(String key, String value); protected abstract void setStringAttribute(String key, String value);
/** /**
* Get a map of all the attributes in this message. * Get a map of all the attributes in this message.
* *
* @return A {@code Map} of the attributes. * @return A {@code Map} of the attributes.
*/ */
abstract protected Map<String,String> getStringAttributeMap(); protected abstract Map<String,String> getStringAttributeMap();
/** /**
* Get the number of child objects. * Get the number of child objects.
* *
* @return The child count. * @return The child count.
*/ */
abstract protected int getChildCount(); protected abstract int getChildCount();
/** /**
* Get the child objects of this message. * Get the child objects of this message.
* *
* @return A list of child {@code FreeColObject}s. * @return A list of child {@code FreeColObject}s.
*/ */
abstract protected List<FreeColObject> getChildren(); protected abstract List<FreeColObject> getChildren();
/** /**
* Set the list of objects attached to this message. * Set the list of objects attached to this message.
* *
* @param fcos The new list of attached {@code FreeColObject}s. * @param fcos The new list of attached {@code FreeColObject}s.
*/ */
abstract protected void setChildren(List<? extends FreeColObject> fcos); protected abstract void setChildren(List<? extends FreeColObject> fcos);
/** /**
* Append a new child. * Append a new child.
@ -181,7 +181,7 @@ public abstract class Message {
* @param <T> The child type. * @param <T> The child type.
* @param fco The new child object. * @param fco The new child object.
*/ */
abstract protected <T extends FreeColObject> void appendChild(T fco); protected abstract <T extends FreeColObject> void appendChild(T fco);
/** /**
* Append a multiple new children. * Append a multiple new children.
@ -189,21 +189,21 @@ public abstract class Message {
* @param <T> The child type. * @param <T> The child type.
* @param fcos The new child objects. * @param fcos The new child objects.
*/ */
abstract protected <T extends FreeColObject> void appendChildren(Collection<T> fcos); protected abstract <T extends FreeColObject> void appendChildren(Collection<T> fcos);
/** /**
* Should this message only be sent to a server by the current player? * Should this message only be sent to a server by the current player?
* *
* @return True if this is a current-player-only message. * @return True if this is a current-player-only message.
*/ */
abstract public boolean currentPlayerMessage(); public abstract boolean currentPlayerMessage();
/** /**
* Get the priority of this type of message. * Get the priority of this type of message.
* *
* @return The message priority. * @return The message priority.
*/ */
abstract public MessagePriority getPriority(); public abstract MessagePriority getPriority();
/** /**
@ -225,7 +225,7 @@ public abstract class Message {
* @param aiPlayer The {@code AIPlayer} the message was sent to. * @param aiPlayer The {@code AIPlayer} the message was sent to.
* @exception FreeColException if there is a problem handling the message. * @exception FreeColException if there is a problem handling the message.
*/ */
abstract public void aiHandler(FreeColServer freeColServer, public abstract void aiHandler(FreeColServer freeColServer,
AIPlayer aiPlayer) throws FreeColException; AIPlayer aiPlayer) throws FreeColException;
/** /**
@ -236,7 +236,7 @@ public abstract class Message {
* @param freeColClient The {@code FreeColClient} to handle this message. * @param freeColClient The {@code FreeColClient} to handle this message.
* @exception FreeColException if there is a problem building the message. * @exception FreeColException if there is a problem building the message.
*/ */
abstract public void clientHandler(FreeColClient freeColClient) public abstract void clientHandler(FreeColClient freeColClient)
throws FreeColException; throws FreeColException;
/** /**
@ -246,7 +246,7 @@ public abstract class Message {
* @param serverPlayer The {@code ServerPlayer} that sent the request. * @param serverPlayer The {@code ServerPlayer} that sent the request.
* @return A {@code ChangeSet} defining the response. * @return A {@code ChangeSet} defining the response.
*/ */
abstract public ChangeSet serverHandler(FreeColServer freeColServer, public abstract ChangeSet serverHandler(FreeColServer freeColServer,
ServerPlayer serverPlayer); ServerPlayer serverPlayer);

View File

@ -38,7 +38,7 @@ public interface MessageHandler {
* @return A reply message, if any. * @return A reply message, if any.
* @exception FreeColException if the message is malformed. * @exception FreeColException if the message is malformed.
*/ */
public Message handle(Connection connection, Message message) Message handle(Connection connection, Message message)
throws FreeColException; throws FreeColException;
/** /**
@ -50,6 +50,6 @@ public interface MessageHandler {
* @exception XMLStreamException if there is a problem reading the * @exception XMLStreamException if there is a problem reading the
* message. * message.
*/ */
public Message read(Connection connection) Message read(Connection connection)
throws FreeColException, XMLStreamException; throws FreeColException, XMLStreamException;
} }

View File

@ -38,35 +38,35 @@ public interface Option<T> extends Cloneable, ObjectWithId {
* @return A clone of this option. * @return A clone of this option.
* @exception CloneNotSupportedException if we can not clone. * @exception CloneNotSupportedException if we can not clone.
*/ */
public Option<T> cloneOption() throws CloneNotSupportedException; Option<T> cloneOption() throws CloneNotSupportedException;
/** /**
* Gets the option group identifier for this option. * Gets the option group identifier for this option.
* *
* @return The option group identifier. * @return The option group identifier.
*/ */
public String getGroup(); String getGroup();
/** /**
* Set the option group for this option. * Set the option group for this option.
* *
* @param group The identifier for the option group. * @param group The identifier for the option group.
*/ */
public void setGroup(String group); void setGroup(String group);
/** /**
* Gets the value of this option. * Gets the value of this option.
* *
* @return The value of this {@code Option}. * @return The value of this {@code Option}.
*/ */
public T getValue(); T getValue();
/** /**
* Sets the value of this option. * Sets the value of this option.
* *
* @param value The new value of this {@code Option}. * @param value The new value of this {@code Option}.
*/ */
public void setValue(T value); void setValue(T value);
/** /**
* Gets the key of an {@code BooleanOption} that must be true for this * Gets the key of an {@code BooleanOption} that must be true for this
@ -74,7 +74,7 @@ public interface Option<T> extends Cloneable, ObjectWithId {
* *
* @return The key of the {@code BooleanOption} that needs to be enabled. * @return The key of the {@code BooleanOption} that needs to be enabled.
*/ */
public String getEnabledBy(); String getEnabledBy();
/** /**
* Initializes this object from an XML-representation of this object. * Initializes this object from an XML-representation of this object.
@ -82,7 +82,7 @@ public interface Option<T> extends Cloneable, ObjectWithId {
* @param xr The input stream with the XML. * @param xr The input stream with the XML.
* @throws XMLStreamException if there are any problems reading the stream. * @throws XMLStreamException if there are any problems reading the stream.
*/ */
public void readFromXML(FreeColXMLReader xr) throws XMLStreamException; void readFromXML(FreeColXMLReader xr) throws XMLStreamException;
/** /**
* Makes an XML-representation of this object. * Makes an XML-representation of this object.
@ -90,11 +90,11 @@ public interface Option<T> extends Cloneable, ObjectWithId {
* @param xw The {@code FreeColXMLWriter} to write to. * @param xw The {@code FreeColXMLWriter} to write to.
* @throws XMLStreamException if there are any problems writing the stream. * @throws XMLStreamException if there are any problems writing the stream.
*/ */
public void toXML(FreeColXMLWriter xw) throws XMLStreamException; void toXML(FreeColXMLWriter xw) throws XMLStreamException;
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override @Override
public String toString(); String toString();
} }

View File

@ -40,7 +40,7 @@ public interface OptionContainer {
* @param returnClass The expected option class. * @param returnClass The expected option class.
* @return True if the option is present. * @return True if the option is present.
*/ */
public <T extends Option> boolean hasOption(String id, Class<T> returnClass); <T extends Option> boolean hasOption(String id, Class<T> returnClass);
/** /**
* Get an option in this group (or descendents) by object identifier. * Get an option in this group (or descendents) by object identifier.
@ -51,7 +51,7 @@ public interface OptionContainer {
* @return The option, or a run time exception if the option does not * @return The option, or a run time exception if the option does not
* exist or is of the wrong class. * exist or is of the wrong class.
*/ */
public <T extends Option> T getOption(String id, Class<T> returnClass); <T extends Option> T getOption(String id, Class<T> returnClass);
/** /**
* Gets the value of a {@code BooleanOption}. * Gets the value of a {@code BooleanOption}.

View File

@ -46,7 +46,7 @@ public class UnitTypeOption extends AbstractOption<UnitType> {
/** /**
* FIXME: replace with Predicates. * FIXME: replace with Predicates.
*/ */
public static enum TypeSelector { public enum TypeSelector {
UNITS, IMMIGRANTS, LAND_UNITS, NAVAL_UNITS UNITS, IMMIGRANTS, LAND_UNITS, NAVAL_UNITS
} }

View File

@ -76,7 +76,7 @@ public class OSUtils {
* *
* @param url The URL to launch * @param url The URL to launch
*/ */
final public static void launchBrowser(String url) { public static final void launchBrowser(String url) {
// Use Desktop Class first // Use Desktop Class first
try { try {
URI uri = java.net.URI.create(url); URI uri = java.net.URI.create(url);
@ -104,7 +104,7 @@ public class OSUtils {
* *
* @see #launchBrowser(String) * @see #launchBrowser(String)
*/ */
final private static String[] getBrowserExecString(String url) { private static final String[] getBrowserExecString(String url) {
if (onMacOSX()) { if (onMacOSX()) {
// Apple Macintosh, Safari is the main browser // Apple Macintosh, Safari is the main browser
return new String[] { "open" , "-a", "Safari", url }; return new String[] { "open" , "-a", "Safari", url };

Some files were not shown because too many files have changed in this diff Show More