- Changed Table to just have an int as its key and use autoboxing to make

that a Comparable. It's a slight performance hit, as when a DSet is
  binary searched, it will be boxing up an int for every entry examined.
  Oh well.
- Use some generics.
- Some other cleanups I spotted while writing actionscript versions.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@29 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-07-28 02:03:53 +00:00
parent 4914a11160
commit b82ab59b1d
8 changed files with 28 additions and 39 deletions
@@ -199,12 +199,12 @@ public class TableItem
"click came from [event=" + event + "].");
} else {
// otherwise, request to join the table at this position
_tdtr.joinTable(table.getTableId(), position);
_tdtr.joinTable(table.tableId, position);
}
} else if (cmd.equals("leave")) {
// if we're not joining, we're leaving
_tdtr.leaveTable(table.getTableId());
_tdtr.leaveTable(table.tableId);
} else if (cmd.equals("go")) {
// they want to see the game... so go there
@@ -189,7 +189,7 @@ public class TableListView extends JPanel
Log.info("Table updated [table=" + table + "].");
// locate the table item associated with this table
TableItem item = getTableItem(table.getTableId());
TableItem item = getTableItem(table.tableId);
if (item == null) {
Log.warning("Received table updated notification for " +
"unknown table [table=" + table + "].");
@@ -257,7 +257,7 @@ public class TableListView extends JPanel
int ccount = _matchList.getComponentCount();
for (int i = 0; i < ccount; i++) {
TableItem child = (TableItem)_matchList.getComponent(i);
if (child.table.getTableId() == tableId) {
if (child.table.tableId == tableId) {
return child;
}
}
@@ -266,7 +266,7 @@ public class TableListView extends JPanel
ccount = _playList.getComponentCount();
for (int i = 0; i < ccount; i++) {
TableItem child = (TableItem)_playList.getComponent(i);
if (child.table.getTableId() == tableId) {
if (child.table.tableId == tableId) {
return child;
}
}