2020-03-07 21:34:18 +01:00
|
|
|
package net.osmand.binary;
|
|
|
|
|
|
|
|
import net.osmand.binary.StringBundle.Item;
|
|
|
|
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
|
|
|
public abstract class StringBundleWriter {
|
|
|
|
|
|
|
|
private StringBundle bundle;
|
|
|
|
|
|
|
|
public StringBundleWriter(StringBundle bundle) {
|
|
|
|
this.bundle = bundle;
|
|
|
|
}
|
|
|
|
|
2020-03-14 19:18:30 +01:00
|
|
|
public StringBundle getBundle() {
|
2020-03-07 21:34:18 +01:00
|
|
|
return bundle;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected abstract void writeItem(String name, Item item);
|
|
|
|
|
|
|
|
public void writeBundle() {
|
|
|
|
for (Entry<String, Item> entry : bundle.getMap().entrySet()) {
|
|
|
|
writeItem(entry.getKey(), entry.getValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|