All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.pds.citool.registry.model.Slots Maven / Gradle / Ivy

Go to download

The Legacy Catalog Tool provides functionality for ingesting PDS3 catalog files into the PDS4 infrastructure including the Registry Service.

There is a newer version: 3.1.0
Show newest version
package gov.nasa.pds.citool.registry.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Slots
{
	private Map> map;
	
	public Slots()
	{
		map = new HashMap>();
	}
	
	public void put(String key, String value)
	{
		List list = new ArrayList(1);
		list.add(value);
		map.put(key, list);
	}

	
	public void put(String key, List values)
	{
		map.put(key, values);
	}

	
	public Set>> entrySet()
	{
		return map.entrySet();
	}

	public List get(String key)
	{
		return map.get(key);
	}
	
	public String getFirst(String key)
	{
		List list = map.get(key);
		return (list == null || list.isEmpty()) ? null : list.get(0);
	}
	
	public boolean containsKey(String key)
	{
		return map.containsKey(key);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy