Class DissolveHalfEdge

 1 /*
 2  * Copyright (c) 2016 Vivid Solutions.
 3  *
 4  * All rights reserved. This program and the accompanying materials
 5  * are made available under the terms of the Eclipse Public License 2.0
 6  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
 7  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html
 8  * and the Eclipse Distribution License is available at
 9  *
10  * http://www.eclipse.org/org/documents/edl-v10.php.
11  */
12  
13 package org.locationtech.jts.dissolve;
14  
15 import org.locationtech.jts.edgegraph.MarkHalfEdge;
16 import org.locationtech.jts.geom.Coordinate;
17  
18  
19 /**
20  * A HalfEdge which carries information
21  * required to support {@link LineDissolver}.
22  * 
23  * @author Martin Davis
24  *
25  */
26 class DissolveHalfEdge extends MarkHalfEdge
27 {
28   private boolean isStart = false;
29   
30   public DissolveHalfEdge(Coordinate orig) {
31     super(orig);
32   }
33  
34   /**
35    * Tests whether this edge is the starting segment
36    * in a LineString being dissolved.
37    * 
38    * @return true if this edge is a start segment
39    */
40   public boolean isStart()
41   {
42     return isStart;
43   }
44   
45   /**
46    * Sets this edge to be the start segment of an input LineString.
47    */
48   public void setStart()
49   {
50     isStart = true;
51   }
52 }
53