package com.osmand.data; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.osmand.osm.Relation; import com.osmand.osm.Way; public class TransportRoute extends MapObject { private List ways; private List forwardStops = new ArrayList(); private List backwardStops = new ArrayList(); private String ref; public TransportRoute(Relation r, String ref){ super(r); this.ref = ref; } public List getForwardStops() { return forwardStops; } public List getBackwardStops() { return backwardStops; } public List getWays() { if(ways == null){ return Collections.emptyList(); } return ways; } public void addWay(Way w){ if(ways == null){ ways = new ArrayList(); } ways.add(w); } public String getRef() { return ref; } public void setRef(String ref) { this.ref = ref; } }