| /******************************************************************************* |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| <<<<<<< HEAD |
| * Pierre Allard - initial API and implementation |
| * Regent L'Archeveque |
| * |
| ======= |
| * Pierre Allard, |
| * Regent L'Archeveque - initial API and implementation |
| * |
| >>>>>>> refs/heads/eclipse_pa |
| * SPDX-License-Identifier: EPL-1.0 |
| * |
| *******************************************************************************/ |
| package org.eclipse.apogy.addons.vehicle; |
| |
| import java.util.List; |
| import java.util.SortedSet; |
| import java.util.TreeSet; |
| |
| public class TerrainProfile { |
| private SortedSet<Segment2D> segments = null; |
| |
| public TerrainProfile() { |
| } |
| |
| public TerrainProfile(List<Segment2D> segments) { |
| getSegments().addAll(segments); |
| } |
| |
| public SortedSet<Segment2D> getSegments() { |
| if (this.segments == null) { |
| this.segments = new TreeSet<Segment2D>(); |
| } |
| return this.segments; |
| } |
| } |