package game.dimension; import java.util.Set; import com.google.common.collect.Sets; public final class Galaxy extends Nameable implements Comparable { public final String id; private final Set sectors = Sets.newTreeSet(); public Galaxy(String id) { this.id = id; } public void addSector(Sector sector) { this.sectors.add(sector); } public int compareTo(Galaxy other) { return other == null ? -1 : this.id.compareTo(other.id); } protected String getNameIdentifier() { return "Galaxie %s"; } protected String getIdentifier() { return this.id; } }