Removed useless "multiplayer" crap and converted to singleplayer

This commit is contained in:
Ondřej Hruška
2014-04-22 21:27:38 +02:00
parent 9e4a237192
commit 3e69505787
48 changed files with 1122 additions and 959 deletions
+35 -6
View File
@@ -42,6 +42,29 @@ public class IonBundle implements IonBinary {
}
public void loadBundle(String key, IonBundle bundle)
{
if (!containsKey(key)) return;
final IonBundle ib = get(key, null);
bundle.clear();
bundle.putAll(ib);
}
public boolean containsKey(Object key)
{
return backingMap.containsKey(key);
}
public boolean containsValue(Object value)
{
return backingMap.containsValue(value);
}
public <K, V> Map<K, V> getMap(String key)
{
final Map<K, V> m = new HashMap<>();
@@ -50,12 +73,12 @@ public class IonBundle implements IonBinary {
}
public <K, V> void loadMap(String key, Map<K, V> map)
public <K, V> void loadMap(String key, Map<K, V> filled)
{
final IonMapWrapper imw = get(key, null);
if (imw == null) return;
map.clear();
imw.fill(map);
filled.clear();
imw.fill(filled);
}
@@ -67,12 +90,12 @@ public class IonBundle implements IonBinary {
}
public <E> void loadSequence(String key, Collection<E> sequence)
public <E> void loadSequence(String key, Collection<E> filled)
{
final IonSequenceWrapper isw = get(key, null);
if (isw == null) return;
sequence.clear();
isw.fill(sequence);
filled.clear();
isw.fill(filled);
}
@@ -262,6 +285,12 @@ public class IonBundle implements IonBinary {
}
public void putAll(IonBundle otherBundle)
{
backingMap.putAll(otherBundle.backingMap);
}
@Override
public String toString()
{
+1 -1
View File
@@ -224,7 +224,7 @@ public class IonInput {
*/
public IonBundle readBundle() throws IOException
{
IonBundle ib = new IonBundle();
final IonBundle ib = new IonBundle();
ib.load(this);
return ib;
}
+1 -1
View File
@@ -270,7 +270,7 @@ public class IonOutput {
}
if (obj instanceof IonBundled) {
throw new IOException("Bundled objects cannot be written to ION stream directly.");
throw new IOException("Bundled objects cannot be written to ION stream directly at " + obj);
}
if (obj instanceof Boolean) {