mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Refactored the setup for MarkObjects (now renamed Markers) and made the CompoundMark + Mark + GeoPoint classes the standard across all classes instead of GateMark + SingleMark + Mark.
#refactor
This commit is contained in:
@@ -3,9 +3,9 @@ package seng302.model.stream.xml.parser;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import seng302.model.Corner;
|
||||
import seng302.model.Limit;
|
||||
import seng302.model.mark.Mark;
|
||||
import seng302.model.mark.CompoundMark;
|
||||
import seng302.model.mark.Corner;
|
||||
|
||||
/**
|
||||
* Process a Document object containing race data in XML format and stores the data.
|
||||
@@ -13,20 +13,18 @@ import seng302.model.mark.Mark;
|
||||
public class RaceXMLData {
|
||||
|
||||
private List<Integer> participants;
|
||||
private Map<Integer, Mark> compoundMarks;
|
||||
private Map<Integer, CompoundMark> compoundMarks;
|
||||
private List<Corner> markSequence;
|
||||
private List<Limit> courseLimit;
|
||||
private Map<Integer, Mark> individualMarks;
|
||||
|
||||
public RaceXMLData(List<Integer> participants, List<Mark> compoundMarks, List<Corner> markSequence,
|
||||
List<Limit> courseLimit) {
|
||||
public RaceXMLData(List<Integer> participants, List<CompoundMark> compoundMarks,
|
||||
List<Corner> markSequence, List<Limit> courseLimit) {
|
||||
this.participants = participants;
|
||||
this.markSequence = markSequence;
|
||||
this.courseLimit = courseLimit;
|
||||
this.compoundMarks = new HashMap<>();
|
||||
for (Mark mark : compoundMarks)
|
||||
this.compoundMarks.put(mark.getId(), mark);
|
||||
for (Mark mark : compoundMarks) {
|
||||
for (CompoundMark cMark : compoundMarks) {
|
||||
this.compoundMarks.put(cMark.getId(), cMark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +32,7 @@ public class RaceXMLData {
|
||||
return participants;
|
||||
}
|
||||
|
||||
public Map<Integer, Mark> getCompoundMarks() {
|
||||
public Map<Integer, CompoundMark> getCompoundMarks() {
|
||||
return compoundMarks;
|
||||
}
|
||||
|
||||
@@ -45,4 +43,5 @@ public class RaceXMLData {
|
||||
public List<Limit> getCourseLimit() {
|
||||
return courseLimit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user