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

org.rx.bean.MultiValueMap Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.bean;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.multimap.ArrayListValuedHashMap;

import java.util.List;

public class MultiValueMap extends ArrayListValuedHashMap {
    private static final long serialVersionUID = 2045827206865943227L;

    public V getFirst(K key) {
        List vs = get(key);
        if (CollectionUtils.isEmpty(vs)) {
            return null;
        }
        return vs.get(0);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy