package org.simantics.diagram.profile.view; import org.eclipse.core.runtime.IAdaptable; import org.simantics.db.Resource; import org.simantics.utils.datastructures.map.Tuple; public class ResourcePair extends Tuple implements IAdaptable{ ResourcePair(Resource first, Resource second) { super(first ,second); } public Resource getFirst() { return (Resource) getField(0); } public Resource getSecond() { return (Resource) getField(1); } @SuppressWarnings("rawtypes") @Override public Object getAdapter(Class adapter) { if (adapter == Resource.class) { return getSecond(); } return null; } }