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:com.ge.predix.acs.commons.web.ResponseEntityBuilderTest.java

@Test
public void testCreatedWithLocation() {
    ResponseEntity<Object> created = ResponseEntityBuilder.created("/report/1", Boolean.FALSE);

    Assert.assertNotNull(created);//  w  ww  .  j  a  va2  s  .c  o  m
    Assert.assertNull(created.getBody());
    Assert.assertEquals(created.getStatusCode(), HttpStatus.CREATED);

    Assert.assertNotNull(created.getHeaders());
    URI location = created.getHeaders().getLocation();
    Assert.assertEquals(location.getPath(), "/report/1");
}

From source file:it.larusba.neo4j.jdbc.http.driver.Neo4jResponseTest.java

@Test
public void hasErrorShoudlReturnFalse() throws SQLException {
    Neo4jResponse response = generateNeo4jResponse(Boolean.FALSE);
    Assert.assertFalse(response.hasErrors());
}

From source file:Main.java

/**
 * Converts a String to a Boolean./*from w ww. java 2s.  co m*/
 * 
 * <code>'true'</code>, <code>'on'</code> or <code>'yes'</code>
 * (case insensitive) will return <code>true</code>.
 * <code>'false'</code>, <code>'off'</code> or <code>'no'</code>
 * (case insensitive) will return <code>false</code>.
 * Otherwise, <code>null</code> is returned.</p>
 *
 * <pre>
 *   BooleanUtils.toBooleanObject(null)    = null
 *   BooleanUtils.toBooleanObject("true")  = Boolean.TRUE
 *   BooleanUtils.toBooleanObject("false") = Boolean.FALSE
 *   BooleanUtils.toBooleanObject("on")    = Boolean.TRUE
 *   BooleanUtils.toBooleanObject("ON")    = Boolean.TRUE
 *   BooleanUtils.toBooleanObject("off")   = Boolean.FALSE
 *   BooleanUtils.toBooleanObject("oFf")   = Boolean.FALSE
 *   BooleanUtils.toBooleanObject("blue")  = null
 * </pre>
 *
 * @param str  the String to check
 * @return the Boolean value of the string,
 *  <code>null</code> if no match or <code>null</code> input
 */
public static Boolean toBooleanObject(String str) {
    if ("true".equalsIgnoreCase(str)) {
        return Boolean.TRUE;
    } else if ("false".equalsIgnoreCase(str)) {
        return Boolean.FALSE;
    } else if ("on".equalsIgnoreCase(str)) {
        return Boolean.TRUE;
    } else if ("off".equalsIgnoreCase(str)) {
        return Boolean.FALSE;
    } else if ("yes".equalsIgnoreCase(str)) {
        return Boolean.TRUE;
    } else if ("no".equalsIgnoreCase(str)) {
        return Boolean.FALSE;
    }
    // no match
    return null;
}

From source file:ch.sbb.releasetrain.webui.backingbeans.DefaultPersistence.java

public Boolean isReady() {
    init();/*  w  w w. ja  v  a  2s  .co m*/
    if (email == null || jenkins == null) {
        return Boolean.FALSE;
    }

    if (email.getSmtpServer() == null || email.getSmtpServer().isEmpty()) {
        return Boolean.FALSE;
    }

    if (jenkins == null || jenkins.getJenkinsBuildToken() == null || jenkins.getJenkinsBuildToken().isEmpty()) {
        return Boolean.FALSE;
    }
    return Boolean.TRUE;
}

From source file:ch.rasc.edsutil.bean.ValidationMessagesResult.java

public void setValidations(List<ValidationMessages> validations) {
    this.validations = validations;
    if (this.validations != null && !this.validations.isEmpty()) {
        setSuccess(Boolean.FALSE);
    }//from ww w  .ja  va 2s. co m
}

From source file:io.syndesis.model.WithProperties.java

@JsonIgnore
default boolean isEndpointProperty(Map.Entry<String, String> e) {
    return this.getProperties() != null && this.getProperties().containsKey(e.getKey())
            && Boolean.FALSE.equals(this.getProperties().get(e.getKey()).getComponentProperty());
}

From source file:com.redhat.rhn.frontend.action.kickstart.test.KickstartScriptActionTest.java

public void testExecute() throws Exception {
    // Lets zero out the scripts
    ksdata = clearScripts(ksdata);/*from   w w  w .  j a v a 2 s  . c om*/
    assertEquals(0, ksdata.getScripts().size());
    addRequestParameter(KickstartScriptCreateAction.SUBMITTED, Boolean.FALSE.toString());
    setRequestPathInfo("/kickstart/KickstartScriptCreate");
    actionPerform();
    assertEquals(0, ksdata.getScripts().size());
    verifyFormValue(KickstartScriptCreateAction.TYPE, KickstartScript.TYPE_PRE);
    assertNotNull(request.getAttribute(KickstartScriptCreateAction.TYPES));
}

From source file:com.omertron.themoviedbapi.model.comparator.PersonCreditDateComparator.java

public PersonCreditDateComparator() {
    this.ascending = Boolean.FALSE;
}

From source file:com.inkubator.hrm.web.employee.EmpPtkpFormController.java

@PostConstruct
@Override//from w w w . j ava 2  s.  c o m
public void initialization() {
    super.initialization();
    try {
        isDisabledPtkpNumber = Boolean.FALSE;
        String empDataId = FacesUtil.getRequestParameter("empDataId");
        empDataModel = new EmpDataModel();
        if (StringUtils.isNotEmpty(empDataId)) {
            EmpData empData = empDataService.getEmpDataWithBiodata(Long.parseLong(empDataId));
            if (empDataId != null) {
                empDataModel = getModelFromEntity(empData);
            }
        }

    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:mx.com.quadrum.service.impl.ContactoServiceImpl.java

@Override
public String agregar(Contacto contacto) {
    contacto.setActivo(Boolean.FALSE);
    contacto.setPrimeraSesion(Boolean.TRUE);
    if (contacto.getGrado() != null) {
        if (contacto.getGrado().getId() == 0) {
            contacto.setGrado(null);//from w w  w .j  a va  2  s  .c  o  m
        }
    }
    if (contactoRepository.agregar(contacto)) {
        return ADD_CORRECT + CONTACTO + contacto.getId();
    }
    return ERROR_HIBERNATE;
}