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

be.bagofwords.util.MappedLists Maven / Gradle / Ivy

package be.bagofwords.util;

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

public class MappedLists extends HashMap> {

    @Override
    public List get(Object key) {
        List result = super.get(key);
        if (result == null) {
            result = new ArrayList<>();
            put((S) key, result);
        }
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy