uk.ac.starlink.util.MapGroup Maven / Gradle / Ivy
package uk.ac.starlink.util;
import java.lang.Comparable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Represents an ordered list of {@link java.util.Map}s containing
* related data.
* The same keys may crop up in the maps comprising the groups, and
* are taken to have the same meaning, so that all the values associated
* with a given key in any of the maps in the group are taken to be
* a related set. There is no requirement however that a key which
* appears in one of the maps has to appear in any or all of the others.
* A single list of the union of all the keys which appear in any
* of the maps in the group can be obtained. An ordering may be
* imposed on this list.
*
* @author Mark Taylor (Starlink)
*/
public class MapGroup {
private final List