All 1-character strings converted to primitives

"b" + "r" now changed to 'b' + 'w'.  It's more straight-forward, and may cause perfomance improvements - character primitives allocation is faster and less expensive than string creation.
This commit is contained in:
vraskulin 2017-01-27 15:57:10 +03:00
parent 31589778ca
commit f60ebfbb1f
451 changed files with 989 additions and 978 deletions

View file

@ -78,7 +78,7 @@ public class MatchView implements Serializable {
this.gameType = match.getOptions().getGameType();
if (table.getName() != null && !table.getName().isEmpty()) {
this.deckType = match.getOptions().getDeckType() + " [" + table.getName() + "]";
this.deckType = match.getOptions().getDeckType() + " [" + table.getName() + ']';
} else {
this.deckType = match.getOptions().getDeckType();
}
@ -102,9 +102,9 @@ public class MatchView implements Serializable {
int lostGames = match.getNumGames() - (matchPlayer.getWins() + match.getDraws());
sb1.append(", ");
sb2.append(matchPlayer.getName()).append(" [");
sb2.append(matchPlayer.getWins()).append("-");
sb2.append(matchPlayer.getWins()).append('-');
if (match.getDraws() > 0) {
sb2.append(match.getDraws()).append("-");
sb2.append(match.getDraws()).append('-');
}
sb2.append(lostGames).append("], ");
}
@ -127,14 +127,14 @@ public class MatchView implements Serializable {
this.matchName = table.getName();
this.gameType = table.getGameType();
if (table.getTournament().getOptions().getNumberRounds() > 0) {
this.gameType = new StringBuilder(this.gameType).append(" ").append(table.getTournament().getOptions().getNumberRounds()).append(" Rounds").toString();
this.gameType = new StringBuilder(this.gameType).append(' ').append(table.getTournament().getOptions().getNumberRounds()).append(" Rounds").toString();
}
StringBuilder sbDeckType = new StringBuilder(table.getDeckType());
if (!table.getTournament().getBoosterInfo().isEmpty()) {
sbDeckType.append(" ").append(table.getTournament().getBoosterInfo());
sbDeckType.append(' ').append(table.getTournament().getBoosterInfo());
}
if (table.getName() != null && !table.getName().isEmpty()) {
sbDeckType.append(table.getDeckType()).append(" [").append(table.getName()).append("]");
sbDeckType.append(table.getDeckType()).append(" [").append(table.getName()).append(']');
}
this.deckType = sbDeckType.toString();
StringBuilder sb1 = new StringBuilder();
@ -145,7 +145,7 @@ public class MatchView implements Serializable {
StringBuilder sb2 = new StringBuilder();
if (table.getTournament().getRounds().size() > 0) {
for (TournamentPlayer tPlayer : table.getTournament().getPlayers()) {
sb2.append(tPlayer.getPlayer().getName()).append(": ").append(tPlayer.getResults()).append(" ");
sb2.append(tPlayer.getPlayer().getName()).append(": ").append(tPlayer.getResults()).append(' ');
}
} else {
sb2.append("Canceled");