- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ArrayList a =
new ArrayList<String>()
new ArrayList()
new ArrayList<Object>()
- Smart code suggestions by Codota
}
private Map<ID, Player<ID>> createIDMap(final U game) { return game.getAllPlayers().stream().collect(Collectors.toMap(Player::getId, p -> p)); }
@SuppressWarnings("WeakerAccess") protected void validatePlayerForGame(final IMPL game, final P player) { if (game instanceof MultiPlayerGame) { if (!game.getAllPlayers().contains(player)) { throw new PlayerNotPartOfGameException(); } } else if (game instanceof SinglePlayerGame) { if (!((SinglePlayerGame) game).getPlayer().equals(player)) { throw new PlayerNotPartOfGameException(); } } }