return foundStart && to >= from ? new int[] { from, to } : null;
}
+
+ public static <K, V> Map<K, V> putWithDuplicationCheck(Map<K, V> map, K key,
+ V value)
+ {
+ if (!map.containsKey(key))
+ {
+ map.put(key, value);
+ }
+ else
+ {
+ jalview.bin.Cache.log.warn(
+ "Attempt to add duplicate entry detected for map with key: "
+ + key.toString() + " and value: " + value.toString());
+ }
+
+ return map;
+ }
}