1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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.db.common.request;
14 import org.simantics.db.Resource;
15 import org.simantics.db.request.AsyncRead;
17 public abstract class ResourceAsyncRead3<T> implements AsyncRead<T> {
19 final protected Resource resource;
20 final protected Resource resource2;
21 final protected Resource resource3;
24 final public int hashCode() {
25 return resource.hashCode() + 41 * (resource2.hashCode() + 31 * resource3.hashCode());
29 public int threadHash() {
30 return resource.hashCode() >>> 16;
34 final public boolean equals(Object object) {
37 else if (object == null)
39 else if (getClass() != object.getClass())
41 ResourceAsyncRead3<?> r = (ResourceAsyncRead3<?>) object;
42 return resource.equals(r.resource) && resource2.equals(r.resource2) && resource3.equals(r.resource3);
46 public int getFlags() {
50 public ResourceAsyncRead3(Resource resource, Resource resource2, Resource resource3) {
51 this.resource = resource;
52 this.resource2 = resource2;
53 this.resource3 = resource3;