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.ceos.project.poi.annotated.bean.cascade.CascadeL1Builder.java

/**
 * Create a CascadeL1 for tests.//from www.  ja  va  2s .co m
 * 
 * @return the {@link CascadeL1}
 */
public static CascadeL1 buildCascadeL1(int multiplier) {
    CascadeL1 toValidate = new CascadeL1();

    toValidate.setDateAttribute(new Date());
    toValidate.setStringAttribute("cascade L1");
    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 L1");
    job.setJobName("Job Name L1");
    toValidate.setJob(job);

    CascadeL2 l2 = CascadeL2Builder.buildCascadeL2();
    ArrayList<CascadeL2> l2List = new ArrayList<>();
    l2List.add(l2);
    l2List.add(l2);
    l2List.add(l2);
    l2List.add(l2);
    l2List.add(l2);

    toValidate.setObjectsList(l2List);

    // TODO add new fields below

    return toValidate;
}

From source file:com.mycompany.listBoxer.services.impl.ListBoxerServiceImpl.java

@Override
public Boolean saveContent(String userInput) {
    if (StringUtils.isBlank(userInput)) {
        return Boolean.FALSE;
    }/*from  w  w w.ja  v a  2 s  .c  o  m*/

    content.add(userInput);
    return Boolean.TRUE;
}

From source file:Main.java

private static Boolean parseBoolean(String s) throws IllegalArgumentException {
    if ("1".equals(s) || "true".equalsIgnoreCase(s)) {
        return Boolean.TRUE;
    } else if ("0".equals(s) || "false".equalsIgnoreCase(s)) {
        return Boolean.FALSE;
    }//w w w.ja  v a 2 s.  c om
    throw new IllegalArgumentException("Expected boolean, got " + s);
}

From source file:com.sirti.microservice.hbase.service.HKpiService.java

public HKpiResultSet findAll() {
    HKpiResultSet hkpiresultset = new HKpiResultSet();

    try {/*from   w ww .j  a v a 2  s. c  om*/
        long starttime = System.nanoTime();
        List<HKpi> hkpilist = hKpiDao.findAll();
        long endtime = System.nanoTime();
        hkpiresultset.setHKpiList(hkpilist);
        hkpiresultset.setDuration((endtime - starttime) / 1000000);
        hkpiresultset.setError(Boolean.FALSE);
    } catch (Exception e) {
        hkpiresultset.setError(Boolean.TRUE);
        hkpiresultset.setErrorMsg(e.getLocalizedMessage());
    }
    return hkpiresultset;
}

From source file:com.haulmont.cuba.web.gui.components.converters.YesNoIconConverter.java

public YesNoIconConverter() {
    super(Boolean.TRUE.toString(), Boolean.FALSE.toString());
}

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

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

    toValidate.setDateAttribute(new Date());
    toValidate.setStringAttribute("some string");
    toValidate.setIntegerAttribute(46 * multiplier);
    toValidate.setBooleanAttribute(Boolean.FALSE);
    toValidate.setDoublePrimitiveAttribute(44.6 * multiplier);
    toValidate.setLongPrimitiveAttribute(987654321L * multiplier);
    toValidate.setFloatAttribute(14.765f * multiplier);
    toValidate.setUnitFamily(UnitFamily.COMPONENTS);
    toValidate.setBigDecimalAttribute(BigDecimal.valueOf(24.777).multiply(BigDecimal.valueOf(multiplier)));
    // TODO add new fields below

    return toValidate;
}

From source file:edu.usu.sdl.openstorefront.common.util.Convert.java

/**
 * Converts an object to a boolean It's meant for handling different string
 * representation/*from  ww  w .  jav  a 2 s .c om*/
 *
 * @param data
 * @return
 */
public static boolean toBoolean(Object data) {
    if (data != null) {
        if (data instanceof Boolean) {
            return (Boolean) data;
        } else if (data instanceof String) {
            if ("T".equalsIgnoreCase(data.toString().trim())) {
                return Boolean.TRUE;
            } else if ("1".equalsIgnoreCase(data.toString().trim())) {
                return Boolean.TRUE;
            } else {
                return Boolean.parseBoolean(data.toString().trim());
            }
        } else {
            return Boolean.TRUE;
        }

    }
    return Boolean.FALSE;
}

From source file:com.vsmjsc.rdgt.task.ListenCodeVerifier.java

@Override
protected Boolean doInBackground(Void... params) {
    HttpGet httpget = new HttpGet();
    try {//from w ww  .ja v a2 s.c  om
        HttpResponse response = httpget.getDataInputStreamFromUrl(
                String.format("http://api.radio18plus.radito.com/1.0/license/check/%s", RadioCode));
        if (response != null && response.getHttpCode() == 200) {
            int status = new JSONObject(response.getContent()).getInt("status");
            if (status == 200) {
                return Boolean.TRUE;
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return Boolean.FALSE;
}

From source file:com.softwarecorporativo.monitoriaifpe.modelo.atividade.validation.ValidadorAtividade.java

@Override
public boolean isValid(Atividade atividade, ConstraintValidatorContext cvc) {
    Date dataInicio = atividade.getDataInicio();
    Date dataFim = atividade.getDataFim();
    if (dataInicio != null && dataFim != null) {
        return (DateUtils.isSameDay(dataInicio, dataInicio) && dataInicio.before(dataFim));
    }//from   w  w  w. j a va 2  s .  c o m
    return Boolean.FALSE;
}

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

/**
 * Create a FreeElementAdvancedObject for tests.
 * /*  w  w  w.  j  a  va 2s .c  om*/
 * @return the {@link FreeElementAdvancedObject}
 */
public static FreeElementAdvancedObject buildFreeElementAdvancedObject(int multiplier) {
    FreeElementAdvancedObject toValidate = new FreeElementAdvancedObject();

    toValidate.setFreeString("The string attribute");
    toValidate.setFreeDouble(Double.valueOf("1169.21") * multiplier);
    toValidate.setFreePrimitiveInt(333 * multiplier);
    toValidate.setFreeDate(new Date());
    toValidate.setFreeLong(Long.valueOf("1511243017") * multiplier);
    toValidate.setFreePrimitiveBoolean(Boolean.FALSE);
    // TODO add new fields below

    return toValidate;
}