List of usage examples for java.lang Boolean FALSE
Boolean FALSE
To view the source code for java.lang Boolean FALSE.
Click Source Link
From source file:Main.java
/** * <p>Negates the specified boolean.</p> * * <p>If {@code null} is passed in, {@code null} will be returned.</p> * * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed to a boolean. </p> * * <pre>/*from w w w .jav a2 s . c om*/ * BooleanUtils.negate(Boolean.TRUE) = Boolean.FALSE; * BooleanUtils.negate(Boolean.FALSE) = Boolean.TRUE; * BooleanUtils.negate(null) = null; * </pre> * * @param bool the Boolean to negate, may be null * @return the negated Boolean, or {@code null} if {@code null} input */ public static Boolean negate(Boolean bool) { if (bool == null) { return null; } return bool.booleanValue() ? Boolean.FALSE : Boolean.TRUE; }
From source file:Main.java
/** * <p>Negates the specified boolean.</p> * * <p>If {@code null} is passed in, {@code null} will be returned.</p> * * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed to a boolean. </p> * * <pre>//ww w . ja v a 2s . c o m * BooleanUtils.negate(Boolean.TRUE) = Boolean.FALSE; * BooleanUtils.negate(Boolean.FALSE) = Boolean.TRUE; * BooleanUtils.negate(null) = null; * </pre> * * @param bool the Boolean to negate, may be null * @return the negated Boolean, or {@code null} if {@code null} input */ public static Boolean negate(final Boolean bool) { if (bool == null) { return null; } return bool.booleanValue() ? Boolean.FALSE : Boolean.TRUE; }
From source file:Main.java
/** * <p>Converts an int to a Boolean using the convention that {@code zero} * is {@code false}.</p>/* w ww . j av a2 s . co m*/ * * <pre> * BooleanUtils.toBoolean(0) = Boolean.FALSE * BooleanUtils.toBoolean(1) = Boolean.TRUE * BooleanUtils.toBoolean(2) = Boolean.TRUE * </pre> * * @param value the int to convert * @return Boolean.TRUE if non-zero, Boolean.FALSE if zero, * {@code null} if {@code null} */ public static Boolean toBooleanObject(int value) { return value == 0 ? Boolean.FALSE : Boolean.TRUE; }
From source file:Main.java
private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); domFactory.setNamespaceAware(true);//from ww w .j av a 2 s . co m // Unfortunately we can not ignore whitespaces without a schema. // So we use the NdLst workaround for now. domFactory.setAttribute("http://apache.org/xml/features/dom/include-ignorable-whitespace", Boolean.FALSE); return domFactory.newDocumentBuilder(); }
From source file:Primitives.java
/** * Get a Boolean from a boolean, equivalent to the java 1.4 method * Boolean.valueOf(boolean)/*from w w w . j a v a 2s . c om*/ * * @param value * the boolean * @return the Boolean equivalent */ public static Boolean valueOf(boolean value) { if (value) return Boolean.TRUE; else return Boolean.FALSE; }
From source file:Main.java
/** * <p>Boolean factory that avoids creating new Boolean objecs all the time.</p> * /* w ww . ja v a 2s . c o m*/ * <p>This method was added to JDK1.4 but is available here for earlier JDKs.</p> * * <pre> * BooleanUtils.toBooleanObject(false) = Boolean.FALSE * BooleanUtils.toBooleanObject(true) = Boolean.TRUE * </pre> * * @param bool the boolean to convert * @return Boolean.TRUE or Boolean.FALSE as appropriate */ public static Boolean toBooleanObject(boolean bool) { return bool ? Boolean.TRUE : Boolean.FALSE; }
From source file:com.jonak.service.UserServiceImp.java
@Override public Boolean checkUserLoginByName(UserBean userobj) { return Boolean.FALSE; }
From source file:cz.cas.lib.proarc.common.export.cejsh.CejshConfig.java
public static CejshConfig from(Configuration conf) { CejshConfig cc = new CejshConfig(); cc.setCejshXslUrl(conf.getString(PROP_MODS_XSL_URL, null)); // cc.setJournalUrl(conf.getString(PROP_JOURNALS_URL, null)); try {/*from w w w . j a va 2 s . com*/ boolean debug = conf.getBoolean(PROP_DEBUG, Boolean.FALSE); cc.setLogLevel(debug ? Level.INFO : Level.FINE); } catch (ConversionException ex) { LOG.log(Level.SEVERE, PROP_DEBUG, ex); } return cc; }
From source file:Main.java
private static XMLEventReader getXMLEventReader(String filename) throws Exception { XMLInputFactory xmlif = null; XMLEventReader xmlr = null;//from w w w .j a v a 2 s. c o m xmlif = XMLInputFactory.newInstance(); xmlif.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.TRUE); xmlif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); xmlif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE); xmlif.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE); FileInputStream fis = new FileInputStream(filename); xmlr = xmlif.createXMLEventReader(filename, fis); return xmlr; }
From source file:com.inkubator.hrm.util.StringsUtils.java
public static boolean isHaveNumber(String toCheck) { Boolean isCondition = Boolean.FALSE; for (int i = toCheck.length() - 1; i >= 0; i--) { if (Character.isDigit(toCheck.charAt(i))) { isCondition = Boolean.TRUE; }//from www .j a va 2 s .co m } return isCondition; }