List of usage examples for java.lang Boolean valueOf
public static Boolean valueOf(String s)
From source file:blue.soundObject.jmask.Mask.java
public static Mask loadFromXML(Element data) { Mask retVal = new Mask(); Elements nodes = data.getElements(); while (nodes.hasMoreElements()) { Element node = nodes.next(); String nodeName = node.getName(); if (nodeName.equals("table")) { Table t = Table.loadFromXML(node); String tabInstance = node.getAttributeValue("tableId"); if (tabInstance.equals("highTable")) { retVal.highTable = t;/* ww w . j a v a 2s .c o m*/ } else if (tabInstance.equals("lowTable")) { retVal.lowTable = t; } } else if (nodeName.equals("highTableEnabled")) { retVal.highTableEnabled = Boolean.valueOf(node.getTextString()).booleanValue(); } else if (nodeName.equals("lowTableEnabled")) { retVal.lowTableEnabled = Boolean.valueOf(node.getTextString()).booleanValue(); } else if (nodeName.equals("low")) { retVal.low = Double.parseDouble(node.getTextString()); } else if (nodeName.equals("high")) { retVal.high = Double.parseDouble(node.getTextString()); } else if (nodeName.equals("mapValue")) { retVal.mapValue = Double.parseDouble(node.getTextString()); } else if (nodeName.equals("enabled")) { retVal.enabled = Boolean.valueOf(node.getTextString()).booleanValue(); } } return retVal; }
From source file:com.nominanuda.hyperapi.JsonAnyValueDecoder.java
@Override protected Object decodeInternal(AnnotatedType p, HttpEntity entity) throws IOException { String s = IO.readAndCloseUtf8(entity.getContent()); if ("null".equals(s)) { return null; } else if ("true".equals(s) || "false".equals(s)) { return Boolean.valueOf(s); } else if (Maths.isNumber(s)) { if (Maths.isInteger(s)) { return Long.valueOf(s); } else {/*from w ww. j a va2s .c o m*/ return Double.valueOf(s); } } else if (s.startsWith("\"") && s.length() > 1) { return STRUCT.jsonStringUnescape(s.substring(1, s.length() - 1)); } else { DataStruct ds = STRUCT.parse(new StringReader(s)); return ds; } }
From source file:gov.nih.nci.nbia.StandaloneDM.java
public StandaloneDM() { this.userId = null; this.password = null; this.serverUrl = System.getProperty("downloadServerUrl"); this.includeAnnotation = Boolean.valueOf((System.getProperty("includeAnnotation"))); this.noOfRetry = NumberUtils.toInt(System.getProperty("noOfrRetry")); }
From source file:org.sakuli.loader.BeanLoader.java
public static Application loadApplication(String applicationNameOrPath, String resumeOnException) { logger.debug("Get an new application object over BeanFactory for \"" + applicationNameOrPath + "\""); return new Application(applicationNameOrPath, Boolean.valueOf(resumeOnException)); }
From source file:com.archivas.logging.FileHandler.java
private static boolean getAppend() { LogManager manager = LogManager.getLogManager(); String cname = FileHandler.class.getName(); String appendStr = manager.getProperty(cname + ".append"); boolean append = true; if (appendStr != null) { append = Boolean.valueOf(appendStr); }//from ww w . j a va 2 s . c o m return append; }
From source file:com.github.xdcrafts.flower.spring.impl.xml.KeywordSelectorBeanDefinitionHandler.java
protected void doParse(Element element, BeanDefinitionBuilder bean) { final String keyword = element.getAttribute("keyword"); bean.addPropertyValue("keyword", keyword); final String required = element.getAttribute("required"); if (required != null && !required.isEmpty()) { bean.addPropertyValue("required", Boolean.valueOf(required)); }//from w ww . jav a 2s .co m }
From source file:com.google.uzaygezen.core.NodeValue.java
@Override public int hashCode() { return 31 * value.hashCode() + Boolean.valueOf(leaf).hashCode(); }
From source file:com.ocs.dynamo.importer.impl.BaseTextImporter.java
@Override protected Boolean getBooleanValueWithDefault(String unit, XlsField field) { Boolean result = getBooleanValue(unit); if (result == null && !StringUtils.isEmpty(field.defaultValue())) { return Boolean.valueOf(field.defaultValue()); }//from w w w . j a va 2s.c o m return result; }
From source file:info.magnolia.module.workflow.commands.simple.ActivationCommand.java
public boolean execute(Context ctx) { boolean recursive; String path = (String) ctx.get(Context.ATTRIBUTE_PATH); String repository = (String) ctx.get(Context.ATTRIBUTE_REPOSITORY); recursive = Boolean.valueOf((String) ctx.get(Context.ATTRIBUTE_RECURSIVE)).booleanValue(); if (log.isDebugEnabled()) { log.debug("recursive = " + recursive); log.debug("user = " + ((info.magnolia.context.Context) ctx).getUser().getName()); }/* w ww. j av a 2 s . co m*/ try { doActivate(repository, path, recursive); } catch (Exception e) { log.error("cannot do activate:" + e.getMessage()); return true; } log.info("exec successfully."); return false; }
From source file:io.fabric8.jolokia.facade.FabricMBeanFacadeTest.java
@Before public void maybeEnableLogging() { if (Boolean.valueOf(System.getProperty("logging"))) { System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "DEBUG"); }//from ww w . j ava 2 s .c om }