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

com.softicar.platform.common.container.map.list.IListMap Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.container.map.list;

import java.util.Collection;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Map from a key to a {@link List} of values.
 *
 * @param 
 *            the key class
 * @param 
 *            the values in the sets
 * @author Oliver Richers
 */
public interface IListMap {

	// -------------------- read-only -------------------- //

	boolean containsKey(K key);

	boolean isEmpty();

	int size();

	Set keySet();

	Set>> entrySet();

	Collection> values();

	/**
	 * Returns the list of values for the given key.
	 * 

* If no matching list exists yet, a new empty list is created and added to * this map. You may use the returned list and add values to it. Those * values will then be part of this map. * * @param key * the key * @return the matching list, never null */ List getList(K key); /** * Returns all values of all lists in this map. * * @return a list of all list values */ List getListsContent(); // -------------------- mutating -------------------- // void clear(); List removeKey(K key); void addToList(K key, V value); void addAllToList(K key, Collection values); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy