]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ResourceCopyRepresentation.java
Fail safe import fixes made by Antti
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / ResourceCopyRepresentation.java
1 package org.simantics.db.layer0.util;
2
3 import java.util.Collection;
4 import java.util.Map;
5
6 import org.simantics.db.RequestProcessor;
7 import org.simantics.db.Resource;
8 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;
9 import org.simantics.utils.datastructures.hints.IHintContext.Key;
10
11 class ResourceCopyRepresentation implements Representation {
12
13     private Collection<Resource> resources;
14
15     public ResourceCopyRepresentation(Collection<Resource> resources) {
16         this.resources = resources;
17     }
18
19     @Override
20     public Key getKey() {
21         return SimanticsKeys.KEY_COPY_RESOURCES;
22     }
23
24     @SuppressWarnings("unchecked")
25     @Override
26     public <T> T getValue(RequestProcessor processor, Map<String,Object> hints) {
27         return (T) resources;
28     }
29
30 }