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:net.sf.packtag.util.SafeLogger.java

/** Returns true if the classes from the Apache Commons Logging library is available */
protected static boolean isCommonsLoggingAvailable() {
    if (commonsLoggingAvailable == null) {
        synchronized (SafeLogger.class) {
            if (commonsLoggingAvailable == null) {
                try {
                    commonsLoggingAvailable = new Boolean(Class.forName("org.apache.commons.logging") != null);
                } catch (ClassNotFoundException e) {
                    commonsLoggingAvailable = Boolean.FALSE;
                }/*from w w  w .java  2  s . c  o m*/
            }
        }
    }
    return commonsLoggingAvailable.booleanValue();
}

From source file:codes.thischwa.c5c.filemanager.FilemanagerConfigurationLoaderTest.java

@Test
public void testObject() throws Exception {
    FilemanagerConfig conf = new FilemanagerConfig();
    conf.setComment("test");
    conf.getOptions().setLang("java");
    conf.getOptions().setRelPath(Boolean.FALSE);

    ObjectMapper mapper = new ObjectMapper();
    String actual = mapper.writeValueAsString(conf);
    String expected = "{\"options\":{\"culture\":null,\"lang\":\"java\",\"theme\":null,\"defaultViewMode\":null,\"autoload\":false,\"showFullPath\":false,\"showTitleAttr\":false,\"browseOnly\":false,\"showConfirmation\":false,\"showThumbs\":false,\"generateThumbnails\":false,\"searchBox\":false,\"listFiles\":false,\"fileSorting\":null,\"dateFormat\":null,\"serverRoot\":false,\"fileRoot\":null,\"relPath\":false,\"logger\":false,\"capabilities\":null,\"plugins\":null,\"chars_only_latin\":false},\"security\":{\"uploadPolicy\":null,\"uploadRestrictions\":null},\"upload\":{\"overwrite\":false,\"imagesOnly\":false,\"fileSizeLimit\":-1},\"exclude\":{\"unallowed_files\":null,\"unallowed_dirs\":null},\"images\":{\"resize\":{\"enabled\":false,\"maxHeight\":0,\"maxWidth\":0},\"imagesExt\":null},\"videos\":{\"showVideoPlayer\":false,\"videosExt\":null,\"videosPlayerHeight\":0,\"videosPlayerWidth\":0},\"audios\":{\"showAudioPlayer\":false,\"audiosExt\":null},\"edit\":{\"enabled\":false,\"lineNumbers\":false,\"lineWrapping\":false,\"codeHighlight\":false,\"theme\":null,\"editExt\":null},\"extras\":{\"extra_js_async\":false,\"extra_js\":null},\"icons\":{\"path\":null,\"directory\":null,\"default\":null},\"customScrollbar\":{\"enabled\":false,\"button\":false,\"theme\":null},\"url\":null,\"_comment\":\"test\"}";
    assertEquals(expected, actual);//from w w  w.j a  va2s . co  m
}

From source file:Main.java

public JPanel getContent() {
    String[] ids = { "north", "west", "south", "east" };
    Boolean[] values = { Boolean.TRUE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE };
    CheckComboStore[] stores = new CheckComboStore[ids.length];
    for (int j = 0; j < ids.length; j++)
        stores[j] = new CheckComboStore(ids[j], values[j]);
    JComboBox combo = new JComboBox(stores);
    combo.setRenderer(new CheckComboRenderer());
    combo.addActionListener(this);
    JPanel panel = new JPanel();
    panel.add(combo);//from   ww w  .ja  v  a  2 s.co m
    return panel;
}

From source file:edu.scripps.fl.hibernate.BooleanListStringType.java

public List<Boolean> getListFromString(String list) {
    List<Boolean> ids = newList(list.length());
    for (int ii = 0; ii < list.length(); ii++) {
        Boolean bool = null;/*w w w  .  ja va  2 s .  c om*/
        if ('0' == list.charAt(ii))
            bool = Boolean.FALSE;
        else if ('1' == list.charAt(ii))
            bool = Boolean.TRUE;
        else
            bool = null;
        ids.set(ii, bool);
    }
    return ids;
}

From source file:edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.visitors.IsomorphismUtilities.java

public static boolean isOperatorIsomorphicPlanSegment(ILogicalOperator op, ILogicalOperator arg)
        throws AlgebricksException {
    List<Mutable<ILogicalOperator>> inputs1 = op.getInputs();
    List<Mutable<ILogicalOperator>> inputs2 = arg.getInputs();
    if (inputs1.size() != inputs2.size())
        return Boolean.FALSE;
    for (int i = 0; i < inputs1.size(); i++) {
        ILogicalOperator input1 = inputs1.get(i).getValue();
        ILogicalOperator input2 = inputs2.get(i).getValue();
        boolean isomorphic = isOperatorIsomorphicPlanSegment(input1, input2);
        if (!isomorphic)
            return Boolean.FALSE;
    }/*from w  ww  .  j  a va2 s.  co m*/
    return IsomorphismUtilities.isOperatorIsomorphic(op, arg);
}

From source file:com.inkubator.securitycore.util.UserInfoUtil.java

public static Boolean hasRole(String roleName) {
    Boolean isHasRole = Boolean.FALSE;
    for (String role : getRoles()) {
        if (role.equalsIgnoreCase(roleName)) {
            isHasRole = Boolean.TRUE;
            break;
        }//from  w  ww  .  j  a  v a 2 s .  c o m
    }
    return isHasRole;
}

From source file:net.ceos.project.poi.annotated.bean.ConditionalFormatObjectBuilder.java

/**
 * Create a ConditionalFormatObject for tests.
 * /*from  www  . ja v  a 2s .c  om*/
 * @return the {@link ConditionalFormatObject}
 */
public static ConditionalFormatObject buildConditionalFormatObject(int multiplier) {
    ConditionalFormatObject toValidate = new ConditionalFormatObject();

    toValidate.setDateAttribute(new Date());
    toValidate.setStringAttribute("Cascade L2");
    toValidate.setIntegerAttribute(46 * multiplier);
    toValidate.setDoubleAttribute(Double.valueOf("25.3") * multiplier);
    toValidate.setLongAttribute(Long.valueOf("1234567890") * multiplier);
    toValidate.setBooleanAttribute(Boolean.FALSE);
    /* create sub object Job */
    Job job = new Job();
    job.setJobCode(0005);
    job.setJobFamily("Family Job Name L2");
    job.setJobName("Job Name L2");
    toValidate.setJob(job);

    return toValidate;
}

From source file:wad.service.GameService.java

public ArrayList<Boolean> checkAnswers(String[] answers) {

    this.answers.add(answer1);
    this.answers.add(answer2);
    this.answers.add(answer3);

    ArrayList<Boolean> results = new ArrayList();

    for (int i = 0; i < answers.length; i++) {
        if (answers[i].equals(this.answers.get(i))) {
            System.out.println("YEAA");
            results.add(Boolean.TRUE);
        } else {//from  w w w.j ava2 s .com
            System.out.println("NOO");
            results.add(Boolean.FALSE);
        }
    }
    return results;
}

From source file:com.betel.flowers.service.UsuarioService.java

public Boolean insert(Usuario usuario) {
    Boolean exito = Boolean.FALSE;
    Usuario axu = this.findByCodigo(usuario);
    if (axu.getId() == null) {
        usuario.setUsername(usuario.getUsername().trim());
        usuario.setCodigo(this.obtenerCodigo());
        usuario.setPassword(DigestUtils.md5Hex(usuario.getPassword()));
        usuario.setFlag(1);// ww  w .j ava  2s  . c  o m
        this.ds.save(usuario);
        exito = Boolean.TRUE;
    }
    return exito;
}

From source file:io.github.moosbusch.lumpi.gui.form.editor.validator.spi.AbstractFormValidator.java

@Override
public boolean isValid(String input) {
    Boolean result = Boolean.FALSE;
    V validator = getValidator();/*from w w  w  .ja  v  a 2s  . co m*/

    try {
        result = (Boolean) MethodUtils.invokeExactMethod(validator, IS_VALID_METHOD_NAME, input);
    } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
        Logger.getLogger(AbstractFormValidator.class.getName()).log(Level.SEVERE, null, ex);
    }

    return result;
}