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

src.samples.java.ex.DMC_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

import java.util.HashMap;
import java.util.Map;

public class DMC_Sample {

    private static Map STUFF = new HashMap<>();

    private static Map flim = new HashMap<>();
    private static Map flam = new HashMap<>();

    static {
        STUFF.put("this", Boolean.TRUE);
        STUFF.put("that", Boolean.FALSE);
        STUFF.put("the", Boolean.TRUE);
        STUFF.put("other", Boolean.FALSE);
        STUFF.put("thing", Boolean.TRUE);
    }

    public String getInfo(boolean v) {

        String data = "";

        for (Map.Entry e : STUFF.entrySet()) {
            if (e.getValue().booleanValue() == v) {
                data += e.getKey();
            }
        }

        return data;
    }

    public static Map fpTernaryGetMapField(boolean b) {
        return b ? flim : flam;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy