summaryrefslogtreecommitdiff
path: root/src/main/java/com/benburwell/planes/graph/Airway.java
blob: 0a40d45dab34f3b1be44abd308ad56fe9252987b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
    }
}