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

com.github.bezsias.multimap.MultiMap Maven / Gradle / Ivy

The newest version!
package com.github.bezsias.multimap;

import java.util.*;

/**
 * Map>
 * Duplicate K-V pairs are allowed.
 * Values are ordered for a single key.
 */
public interface MultiMap {

    /** Returns the number of key-value pairs. */
    int size();

    /** Lower limit on key size **/
    int minKeySize();

    /** Upper limit on key size **/
    int maxKeySize();

    boolean isEmpty();

    boolean contains(K key);

    boolean contains(K key, V value);

    Set keys();

    void put(K key, V value);

    void putAll(K key, List values);

    List get(K key);

    /** Removes all values associated with a key. */
    void remove(K key);

    /** Returns the count of removed elements */
    void remove(K key, V value);

    void clear();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy