diff options
Diffstat (limited to 'subprojects/store')
-rw-r--r-- | subprojects/store/src/main/java/tools/refinery/store/model/ModelCursor.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/model/ModelCursor.java b/subprojects/store/src/main/java/tools/refinery/store/model/ModelCursor.java deleted file mode 100644 index a835cf69..00000000 --- a/subprojects/store/src/main/java/tools/refinery/store/model/ModelCursor.java +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | package tools.refinery.store.model; | ||
2 | |||
3 | import java.util.Map; | ||
4 | |||
5 | import tools.refinery.store.map.Cursor; | ||
6 | import tools.refinery.store.model.representation.DataRepresentation; | ||
7 | |||
8 | public class ModelCursor { | ||
9 | final Map<DataRepresentation<?, ?>,Cursor<?,?>> cursors; | ||
10 | |||
11 | public ModelCursor(Map<DataRepresentation<?, ?>, Cursor<?, ?>> cursors) { | ||
12 | super(); | ||
13 | this.cursors = cursors; | ||
14 | } | ||
15 | |||
16 | @SuppressWarnings("unchecked") | ||
17 | public <K,V> Cursor<K,V> getCursor(DataRepresentation<K, V> representation) { | ||
18 | Cursor<?, ?> cursor = cursors.get(representation); | ||
19 | if(cursor != null) { | ||
20 | return (Cursor<K, V>) cursor; | ||
21 | } else { | ||
22 | throw new IllegalArgumentException("ModelCursor does not contain cursor for representation "+representation); | ||
23 | } | ||
24 | } | ||
25 | } | ||