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 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   www.  j a v a 2  s  .  co  m*/
        setWimaxEnabled = samsungWimaxManager.getClass().getMethod("setWimaxEnabled",
                new Class[] { Boolean.TYPE });
    } catch (Exception e) {
        e.printStackTrace();
    }
    try {
        if (state) {
            if (setWimaxEnabled != null) {
                setWimaxEnabled.invoke(samsungWimaxManager, Boolean.TRUE);
            }
        } else {
            if (setWimaxEnabled != null) {
                setWimaxEnabled.invoke(samsungWimaxManager, Boolean.FALSE);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:Main.java

/**
 * Convenience method to get a new instance of a TransformerFactory.
 * If the {@link #TransformerFactory} is an instance of
 * net.sf.saxon.TransformerFactoryImpl, the attribute
 * {@link #FeatureKeys.VERSION_WARNING} will be set to false in order to
 * suppress the warning about using an XSLT1 stylesheet with an XSLT2
 * processor./*from  w  w w .j  a va  2s.c o  m*/
 *
 * @return a new instance of TransformerFactory
 */
public static TransformerFactory getTransformerFactory() {
    TransformerFactory factory = TransformerFactory.newInstance();
    if (factory.getClass().getName().equals("net.sf.saxon.TransformerFactoryImpl")) {
        factory.setAttribute("http://saxon.sf.net/feature/version-warning", Boolean.FALSE);
    }
    return factory;
}

From source file:Main.java

protected static synchronized void initializeXMLInputFactory() {
    if (xmlInputFactory == null) {
        xmlInputFactory = XMLInputFactory.newInstance();
        xmlInputFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE);
        xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
        xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); // This disables DTDs entirely for that factory
        xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);
    }/*from   w  ww.j  ava 2s  .c o m*/
}

From source file:dnd.LocationSensitiveDemo.java

public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            try {
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                increaseFont("Tree.font");
                increaseFont("Label.font");
                increaseFont("ComboBox.font");
                increaseFont("List.font");
            } catch (Exception e) {
            }/*from  ww w  .  jav  a 2  s .c om*/

            //Turn off metal's use of bold fonts
            UIManager.put("swing.boldMetal", Boolean.FALSE);
            createAndShowGUI();
        }
    });
}

From source file:Main.java

/**
 * Returns true if at least one Accelerometer sensor is available
 *//*from  ww w .  j  a  v a 2  s  .c  o  m*/
public static boolean isSupported() {
    //Log.v(AccelerometerUtils.class.getClass().getCanonicalName(), "isSupported Accelerometer "+supported+" "+oContext);
    if (supported == null) {
        if (oContext != null) {
            sensorManager = (SensorManager) oContext.getSystemService(Context.SENSOR_SERVICE);
            List<Sensor> sensors = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER);
            supported = new Boolean(sensors.size() > 0);
        } else {
            supported = Boolean.FALSE;
        }
    }
    return supported;
}

From source file:FileUtil.java

public static void copyFile(String from, String to) {
    copyFile(from, to, Boolean.FALSE);
}

From source file:Main.java

/**
 * Removes HANDLES_ENABLE_STATE mark from component client properties.
 *
 * @param component component to process
 *///from   w  w w  .  j av a  2  s  .  co  m
public static void removeHandlesEnableStateMark(final JComponent component) {
    component.putClientProperty(HANDLES_ENABLE_STATE, Boolean.FALSE);
}

From source file:Main.java

/**
 * <p>Checks if a {@code Boolean} value is {@code false},
 * handling {@code null} by returning {@code false}.</p>
 *
 * <pre>/*w  w  w. j  a  v a  2s  . c  om*/
 *   BooleanUtils.isFalse(Boolean.TRUE)  = false
 *   BooleanUtils.isFalse(Boolean.FALSE) = true
 *   BooleanUtils.isFalse(null)          = false
 * </pre>
 *
 * @param bool  the boolean to check, null returns {@code false}
 * @return {@code true} only if the input is non-null and false
 * @since 2.1
 */
public static boolean isFalse(Boolean bool) {
    return Boolean.FALSE.equals(bool);
}

From source file:net.sf.packtag.util.SafeLogger.java

/** Returns true if the classes from the Apache Log4j library is available */
protected static boolean isLog4jAvailable() {
    if (log4jAvailable == null) {
        synchronized (SafeLogger.class) {
            if (log4jAvailable == null) {
                try {
                    log4jAvailable = new Boolean(Class.forName("org.apache.log4j.Logger") != null);
                } catch (ClassNotFoundException e) {
                    log4jAvailable = Boolean.FALSE;
                }//from  ww w.ja va 2s.c  o m
            }
        }
    }
    return log4jAvailable.booleanValue();
}

From source file:Main.java

private static boolean canDisableExternalDtds(SAXParserFactory parserFactory) {
    if (canDisableExternalDtds == null) {
        try {//from ww  w . j  a  v  a  2s  .  co m
            parserFactory.getFeature(XERCES_LOAD_EXTERNAL_DTD);
            canDisableExternalDtds = Boolean.TRUE;
        } catch (Exception ex) {
            canDisableExternalDtds = Boolean.FALSE;
        }
    }
    return canDisableExternalDtds.booleanValue();
}