package org.eclipse.viatra.solver.data.model; import java.util.Map; import org.eclipse.viatra.solver.data.map.Cursor; import org.eclipse.viatra.solver.data.model.representation.DataRepresentation; public class ModelCursor { final Map,Cursor> cursors; public ModelCursor(Map, Cursor> cursors) { super(); this.cursors = cursors; } @SuppressWarnings("unchecked") public Cursor getCursor(DataRepresentation representation) { Cursor cursor = cursors.get(representation); if(cursor != null) { return (Cursor) cursor; } else { throw new IllegalArgumentException("ModelCursor does not contain cursor for representation "+representation); } } }