src.samples.java.ex.DMC_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fb-contrib Show documentation
Show all versions of fb-contrib Show documentation
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.
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 - 2025 Weber Informatics LLC | Privacy Policy