skadistats.clarity.match.GameEventDescriptorCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarity Show documentation
Show all versions of clarity Show documentation
Clarity is an open source replay parser for Dota 2 and CSGO 1 and 2 written in Java.
package skadistats.clarity.match;
import java.util.Map;
import java.util.TreeMap;
import skadistats.clarity.model.GameEventDescriptor;
public class GameEventDescriptorCollection {
private final Map byId = new TreeMap();
private final Map byName = new TreeMap();
public void add(GameEventDescriptor descriptor) {
byId.put(descriptor.getEventId(), descriptor);
byName.put(descriptor.getName(), descriptor);
}
public GameEventDescriptor forName(String name) {
return byName.get(name);
}
public GameEventDescriptor forId(int id) {
return byId.get(id);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy