org.vagabond.explanation.marker.MarkerSetUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vagabond Show documentation
Show all versions of vagabond Show documentation
Vagabond is a tool for automatic generation of explanations for data exchange errors.
package org.vagabond.explanation.marker;
import java.util.HashMap;
import java.util.Map;
public class MarkerSetUtil {
public static Map partitionOnRelation (IMarkerSet set) {
Map result;
result = new HashMap ();
for(ISingleMarker marker : set) {
String rel = marker.getRel();
if (!result.containsKey(rel)) {
result.put(rel, MarkerFactory.newMarkerSet());
}
result.get(rel).add(marker);
}
return result;
}
}