]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Link.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / graph / impl / Link.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2013 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 /**
13  * 
14  */
15 package org.simantics.objmap.graph.impl;
16
17 import org.simantics.objmap.graph.schema.ILinkType;
18
19
20 /**
21  * An indication that the domain element corresponds to the range element
22  * in the mapping. The link type describes how source and target objects
23  * are updated. There are additionally flags for dirtiness of the link.
24  * @author Hannu Niemistö
25  */
26 public class Link<Domain,Range> {
27         public ILinkType<Domain,Range> type;
28         public Domain domainElement;
29         public Range rangeElement;
30         
31         public boolean domainModified = false;
32         public boolean rangeModified = false;
33         public boolean removed = false;
34         
35         public Link(ILinkType<Domain,Range> type, Domain domainElement, Range rangeElement) {
36                 this.type = type;
37                 this.domainElement = domainElement;
38                 this.rangeElement = rangeElement;               
39         }               
40 }