Example usage for java.lang Boolean FALSE

List of usage examples for java.lang Boolean FALSE

Introduction

In this page you can find the example usage for java.lang Boolean FALSE.

Prototype

Boolean FALSE

To view the source code for java.lang Boolean FALSE.

Click Source Link

Document

The Boolean object corresponding to the primitive value false .

Usage

From source file:Main.java

public static Boolean queryFrom(TemporalAccessor temporal) {
    if (temporal.isSupported(ChronoField.DAY_OF_MONTH) && temporal.isSupported(ChronoField.DAY_OF_WEEK)) {
        int dayOfMonth = temporal.get(ChronoField.DAY_OF_MONTH);
        int weekDay = temporal.get(ChronoField.DAY_OF_WEEK);
        DayOfWeek dayOfWeek = DayOfWeek.of(weekDay);
        if (dayOfMonth == 1 && dayOfWeek == DayOfWeek.MONDAY) {
            return Boolean.TRUE;
        }//  ww  w  . j a va  2 s.c om
    }
    return Boolean.FALSE;
}

From source file:Main.java

public static DocumentBuilder getDocumentBuilder(boolean NamespaceAwareness)
        throws ParserConfigurationException {
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    domFactory.setNamespaceAware(NamespaceAwareness);
    // Unfortunately we can not ignore whitespaces without a schema.
    // So we use the NdLst workaround for now.
    //domFactory.setValidating(true);
    //domFactory.setIgnoringElementContentWhitespace( true );
    domFactory.setAttribute("http://apache.org/xml/features/dom/include-ignorable-whitespace", Boolean.FALSE);

    return domFactory.newDocumentBuilder();
}

From source file:Main.java

public static void samsungWimax(Context context, boolean state) {
    //http://forum.xda-developers.com/archive/index.php/t-909206.html
    Object samsungWimaxManager = context.getSystemService("WiMax");
    Method setWimaxEnabled = null;
    try {//from ww w  .  j  a  va  2  s . co  m
        setWimaxEnabled = samsungWimaxManager.getClass().getMethod("setWimaxEnabled",
                new Class[] { Boolean.TYPE });
    } catch (Exception e) {
        e.printStackTrace();
    }
    try {
        if (state) {
            setWimaxEnabled.invoke(samsungWimaxManager, new Object[] { Boolean.TRUE });
        } else {
            setWimaxEnabled.invoke(samsungWimaxManager, new Object[] { Boolean.FALSE });
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:Main.java

public static Boolean isEmpty(Collection<?> collection) {
    if (collection == null || collection.size() < 1) {
        return Boolean.TRUE;
    }/*from   www.jav a 2  s .co  m*/
    return Boolean.FALSE;
}

From source file:Main.java

public static String marshal(Object object) throws Exception {
    StringWriter string = new StringWriter();
    JAXBContext jaxbContext = JAXBContext.newInstance(object.getClass());
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
    marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); //$NON-NLS-1$
    marshaller.marshal(object, string);//w ww . java  2  s. c  o m
    return string.toString();
}

From source file:Main.java

private static DocumentBuilder getDocumentBuilder(boolean NamespaceAwareness)
        throws ParserConfigurationException {
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    domFactory.setNamespaceAware(NamespaceAwareness);
    //domFactory.setValidating(true);
    //domFactory.setIgnoringElementContentWhitespace( true );
    domFactory.setAttribute("http://apache.org/xml/features/dom/include-ignorable-whitespace", Boolean.FALSE);

    return domFactory.newDocumentBuilder();
}

From source file:com.inkubator.hrm.util.StringsUtils.java

public static Boolean isHaveLowerCase(String str) {
    Boolean isCondition = Boolean.FALSE;
    for (int i = str.length() - 1; i >= 0; i--) {

        if (Character.isLowerCase(str.charAt(i))) {
            isCondition = Boolean.TRUE;
        }//from w w w . ja va2s.c o  m
    }
    return isCondition;

}

From source file:Main.java

public static DocumentBuilder getJaxpDocBuilder() {
    try {//from www.j a  v  a 2 s .c  om
        synchronized (jaxpLock) {
            System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
                    "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
            System.setProperty("javax.xml.parsers.SaxParserFactory",
                    "org.apache.xerces.jaxp.SAXParserFactoryImpl");
            DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
            docBuildFactory.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion",
                    Boolean.FALSE);
            docBuildFactory.setNamespaceAware(true);
            docBuildFactory.setValidating(false);
            return docBuildFactory.newDocumentBuilder();
        }
    } catch (ParserConfigurationException pce) {
        throw new RuntimeException(pce.getMessage());
    }
}

From source file:Main.java

public static Boolean isCollection(Object object) {
    if (object == null)
        return Boolean.FALSE;
    return Collection.class.isAssignableFrom(object.getClass());
}

From source file:Main.java

public static Boolean booleanValueOf(boolean b) {
    return (b ? Boolean.TRUE : Boolean.FALSE);
}