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

j6.Thro Maven / Gradle / Ivy

There is a newer version: 1.0.38
Show newest version
package j6;

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

public class Thro {

    static Map> aa = new HashMap<>();

    public static void addSuppressed(Throwable a, Throwable b) {
        List list = aa.get(a);
        if (list == null) {
            list = new ArrayList<>();
            aa.put(a, list);
        }
        list.add(b);
    }

    public static Throwable[] getSuppressed(Throwable a) {
        List list = aa.remove(a);
        if (list == null) {
            return null;
        }
        return list.toArray(new Throwable[list.size()]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy