- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
} else if (person instanceof IPirate) { IPirate pirate = (IPirate) person; pirate.setName(pirateFirstNameLoader.getRandomName()+" "+pirateLastNameLoader.getRandomName()); pirate.setFollowers(rnd.nextInt(15)+12); pirate.setProfitShare((rnd.nextInt(7)*5+35)/100.0); } else if (person instanceof IPirateHunter) { IPirateHunter hunter = (IPirateHunter) person;
setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernPirateDialog.title", new Object[]{}, locale.getCurrentLocal())); int share = (int)Math.rint(pirate.getProfitShare()*100); String loadedText = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernPirateDialog.dialog", new Object[]{pirate.getFollowers(), share}, locale.getCurrentLocal()); try { boolean wholeHanseFlag = ((Node) event.getSource()).getId().equals("wholeHanse"); final INonFreeSeaPirate seaPirate = peopleFactory.createNewPirate(pirate.getName(), currentShip.get(), city.getPlayer(), wholeHanseFlag ? null : city.getCity()); seaPiratesState.add(seaPirate); int nbDays = rnd.nextInt(200) + 30; city.getPlayer().removeShip(currentShip.get()); city.getPlayer().removeSelectableVessel(currentShip.get()); pirate.leave();