]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.maps/src/org/simantics/maps/query/Query.java
Share some projects for Simantics District
[simantics/district.git] / org.simantics.district.maps / src / org / simantics / maps / query / Query.java
1 /*******************************************************************************
2  * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     VTT Technical Research Centre of Finland - initial API and implementation
10  *******************************************************************************/
11 package org.simantics.maps.query;
12
13
14 /**
15  * @author Tuukka Lehtonen
16  *
17  * @param <S>
18  * @param <R>
19  */
20 public class Query<S, R> {
21
22     public final S                    source;
23
24     public final IQueryListener<S, R> listener;
25
26     public Query(S source, IQueryListener<S, R> listener) {
27         assert source != null;
28         assert listener != null;
29
30         this.source = source;
31         this.listener = listener;
32     }
33
34     @Override
35     public String toString() {
36         return getClass().getName() + " [" + source + "]";
37     }
38
39 }