1 /*******************************************************************************
2 * Copyright (c) 2011 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.diagram.connection;
14 import gnu.trove.map.hash.THashMap;
16 import java.io.Serializable;
18 public class RouteLink extends RoutePoint implements Serializable {
20 private static final long serialVersionUID = 1446230300676765986L;
26 * Default constructor for copy-method
31 public RouteLink(RouteLine a, RouteLine b) {
38 void removeFromOther(RouteLine other) {
40 b.points.remove(this);
42 a.points.remove(this);
45 public RouteLine getA() {
49 public RouteLine getB() {
53 public void setA(RouteLine rl) {
60 public void setB(RouteLine rl) {
67 public RouteLine getOther(RouteLine line) {
74 public void replace(RouteLine rl1, RouteLine rl2) {
82 RouteLink copy(THashMap<Object, Object> map) {
83 RouteLink copy = (RouteLink)map.get(this);
85 copy = new RouteLink();