diff options
Diffstat (limited to 'src/main/java/com/benburwell/planes/graph/Airway.java')
-rw-r--r-- | src/main/java/com/benburwell/planes/graph/Airway.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/com/benburwell/planes/graph/Airway.java b/src/main/java/com/benburwell/planes/graph/Airway.java new file mode 100644 index 0000000..0a40d45 --- /dev/null +++ b/src/main/java/com/benburwell/planes/graph/Airway.java @@ -0,0 +1,29 @@ +package com.benburwell.planes.graph; + +import com.benburwell.planes.data.Position; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author ben + */ +public class Airway { + private String code; + private List<Position> points = new ArrayList<>(); + + public Airway(String code) { + this.code = code; + } + + public void addPoint(double latitude, double longitude) { + Position pos = new Position(); + pos.setLatitude(latitude); + pos.setLongitude(longitude); + this.points.add(pos); + } + + public List<Position> getPoints() { + return this.points; + } +} |