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:org.springmodules.util.ObjectsTests.java

public void testHashCodeWithBooleanFalse() {
    int expected = Boolean.FALSE.hashCode();
    assertEquals(expected, Objects.hashCode(false));
}

From source file:NumberUtil.java

/**
 * Optimisation Code//from  w w  w .  jav a  2  s  .  co m
 */
public static Boolean getBoolean(boolean bool) {
    return bool ? Boolean.TRUE : Boolean.FALSE;
}

From source file:com.inkubator.hrm.web.loan.LoanNewSchemaFormController.java

@PostConstruct
@Override//from  w w  w.j  ava2s  .c  o m
public void initialization() {
    super.initialization();
    try {
        model = new LoanNewSchemaModel();
        isUpdate = Boolean.FALSE;
        String loanNewSchemaId = FacesUtil.getRequestParameter("loanNewSchemaId");
        if (StringUtils.isNotEmpty(loanNewSchemaId)) {
            LoanNewSchema savingType = loanNewSchemaService.getEntiyByPK(Long.parseLong(loanNewSchemaId));
            if (loanNewSchemaId != null) {
                model = getModelFromEntity(savingType);
                isUpdate = Boolean.TRUE;
            }
        }
    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:com.mulesoft.mql.impl.JoinPredicate.java

public boolean evaluate(Object object) {
    Map<String, Object> vars = (Map<String, Object>) object;

    try {//from w ww. j av a  2s . com
        if (onExpression != null) {
            // Execute the on expression. Continue as long as it doesn't return 
            // null or false.
            Object result = MVEL.executeExpression(onExpression, vars);

            if (result == null || Boolean.FALSE.equals(result)) {
                return false;
            }
        }
    } catch (RuntimeException e) {
        throw new RuntimeException(
                "Could not execute expression " + join.getExpression() + " on context " + object, e);
    }

    try {
        // Execute the expression and shove the result back in as the context variable
        Object result = MVEL.executeExpression(compiledExpression, vars);

        vars.put(queryBuilder.getJoin().getAs(), result);
    } catch (RuntimeException e) {
        throw new RuntimeException(
                "Could not execute expression " + join.getExpression() + " on context " + object, e);
    }

    return true;
}

From source file:org.openmrs.module.kenyareg.fragment.controller.BasicSearchFragmentController.java

private void setDisplayAttributes(int server, Session session) {
    switch (server) {
    case Server.MPI_LPI:
        session.setAttribute("lpiDisplayed", Boolean.FALSE);
        session.setAttribute("mpiDisplayed", Boolean.FALSE);
        break;//from w  w w  . ja  va  2s . com
    case Server.MPI:
        session.setAttribute("mpiDisplayed", Boolean.FALSE);
        break;
    case Server.LPI:
        session.setAttribute("lpiDisplayed", Boolean.FALSE);
        break;
    }
}

From source file:com.sysomos.test.SysomosJsonSerDeTest.java

@Test
public void Test() {
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE);
    mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE);
    mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE);

    InputStream is = SysomosJsonSerDeTest.class.getResourceAsStream("/sysomos_jsons.txt");
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);

    try {/*from   w  w  w .j a  v  a  2 s  .c  o  m*/
        while (br.ready()) {
            String line = br.readLine();
            LOGGER.debug(line);

            Sysomos ser = mapper.readValue(line, Sysomos.class);

            String des = mapper.writeValueAsString(ser);
            LOGGER.debug(des);
        }
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail();
    }
}

From source file:com.enonic.cms.business.MockSitePropertiesService.java

public Boolean getPropertyAsBoolean(String key, SiteKey siteKey) {
    String svalue = getProperty(key, siteKey);

    return svalue == null ? Boolean.FALSE : Boolean.valueOf(svalue);
}

From source file:com.inkubator.hrm.web.reference.BankGroupFormController.java

@PostConstruct
@Override/*w ww  .  j  av a2 s  .  com*/
public void initialization() {
    super.initialization();
    try {
        String bankGroupId = FacesUtil.getRequestParameter("bankGroupId");
        model = new BankGroupModel();
        isUpdate = Boolean.FALSE;
        if (StringUtils.isNotEmpty(bankGroupId)) {
            BankGroup bankGroup = service.getEntiyByPK(Long.parseLong(bankGroupId));
            if (bankGroupId != null) {
                model = getModelFromEntity(bankGroup);
                isUpdate = Boolean.TRUE;
            }
        }
    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:edu.umd.cs.findbugs.detect.LpPreCompileRegCheck.java

@Override
public void visit(Code obj) {
    String methodName = getMethodName();
    // this.get/*from   w  w w  .  jav a 2  s .co m*/
    // (springinitset)
    if (StringUtils.isNotBlank(methodName) && (!"<clinit>".equals(methodName) && !"<init>".equals(methodName)
            && !methodName.startsWith("init") && !methodName.startsWith("set"))) {
        isMethod = Boolean.TRUE;
        super.visit(obj);
    } else {
        isMethod = Boolean.FALSE;
        return;
    }
}

From source file:com.gargoylesoftware.htmlunit.html.HtmlImageTest.java

/**
 * @throws Exception if the test fails//from  w ww.  j  av  a 2s.co  m
 */
@Test
public void isMapClick() throws Exception {
    isMapClick("img1", Boolean.FALSE, "?0,0", "?25,30");
    isMapClick("img2", Boolean.FALSE, "", "");
    isMapClick("img3", Boolean.TRUE, "", "");
    isMapClick("img3", Boolean.TRUE, "", "");
}