Example usage for java.lang Boolean TRUE

List of usage examples for java.lang Boolean TRUE

Introduction

In this page you can find the example usage for java.lang Boolean TRUE.

Prototype

Boolean TRUE

To view the source code for java.lang Boolean TRUE.

Click Source Link

Document

The Boolean object corresponding to the primitive value true .

Usage

From source file:org.springmodules.util.ObjectsTests.java

public void testHashCodeWithBooleanTrue() {
    int expected = Boolean.TRUE.hashCode();
    assertEquals(expected, Objects.hashCode(true));
}

From source file:com.poscoict.license.security.AjaxSessionTimeoutFilter.java

private boolean isAjaxRequest(HttpServletRequest req) {
    return req.getHeader(ajaxHeader) != null && req.getHeader(ajaxHeader).equals(Boolean.TRUE.toString());
}

From source file:test.gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.TeacherResourceTest.java

public void testNothing() {
    assertTrue(Boolean.TRUE);
}

From source file:com.shopzilla.publisher.service.CategorySearchService.java

public CatalogResponse categorySearch(Long categoryId, Integer numResults) {
    ProductSearchRequest productSearchRequest = new ProductSearchRequest();
    productSearchRequest.setApiKey(apiKey);
    productSearchRequest.setPublisherId(publisherId);
    productSearchRequest.setCategoryId(categoryId.toString());
    productSearchRequest.setNumResults(numResults);
    productSearchRequest.setShowAttributes(Boolean.TRUE);

    return restCatalogAPIClient.performSearch(productSearchRequest);
}

From source file:au.id.hazelwood.xmltvguidebuilder.binding.BindingService.java

public BindingService(String contextPath) throws JAXBException {
    StopWatch stopWatch = new StopWatch();
    stopWatch.start();/* ww  w . j a  va 2 s  .c  om*/
    JAXBContext jaxbContext = JAXBContext.newInstance(contextPath);
    marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    stopWatch.stop();
    LOGGER.debug("BindingService created for {} in {}", contextPath, formatDurationWords(stopWatch.getTime()));
}

From source file:com.exxonmobile.ace.hybris.storefront.forms.validation.PaymentDetailsValidator.java

@Override
public void validate(final Object object, final Errors errors) {
    final PaymentDetailsForm form = (PaymentDetailsForm) object;

    final Calendar start = parseDate(form.getStartMonth(), form.getStartYear());
    final Calendar expiration = parseDate(form.getExpiryMonth(), form.getExpiryYear());

    if (start != null && expiration != null && start.after(expiration)) {
        errors.rejectValue("startMonth", "payment.startDate.invalid");
    }// w w  w  .  ja  va2 s  .  c om

    final boolean editMode = StringUtils.isNotBlank(form.getPaymentId());
    if (editMode || Boolean.TRUE.equals(form.getNewBillingAddress())) {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.titleCode", "address.title.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.firstName",
                "address.firstName.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.lastName",
                "address.lastName.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.line1", "address.line1.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.townCity",
                "address.townCity.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.postcode",
                "address.postcode.invalid");
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.countryIso",
                "address.country.invalid");
        //         ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.line2", "address.line2.invalid"); // for some addresses this field is required by cybersource
    }
}

From source file:com.snv.calendar.CalendarCrudService.java

public CalendarCrudService() {
    if (!Boolean.FALSE.equals(isCalendarCrudServiceImplemented)) {
        throw new IllegalStateException(
                "L'instance calendarCrudService ne peut tre implment plus d'une fois.");
    }//from w ww  .  j ava 2s  .c om
    this.open();
    isCalendarCrudServiceImplemented = Boolean.TRUE;
}

From source file:de.cosmocode.collections.utility.Convert.java

@edu.umd.cs.findbugs.annotations.SuppressWarnings("NP_BOOLEAN_RETURN_NULL")
private static Boolean doIntoBoolean(Object value) {
    if (value == null)
        return null;
    if (value instanceof Boolean)
        return Boolean.class.cast(value);
    final String converted = doIntoString(value);
    if ("true".equalsIgnoreCase(converted)) {
        return Boolean.TRUE;
    } else if ("false".equalsIgnoreCase(converted)) {
        return Boolean.FALSE;
    } else {/*from  www.j  av a2s  .c  o  m*/
        return null;
    }
}

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

public HKpiResultSet findFilterAlarms(String filter) {
    HKpiResultSet hkpiresultset = new HKpiResultSet();

    try {/* w w  w.  j  a  v  a 2  s. c  o  m*/
        long starttime = System.nanoTime();
        List<HKpi> hkpilist = hKpiDao.findFilterHKpi(filter);
        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.snv.bank.account.AccountCrudService.java

public AccountCrudService() {
    if (!Boolean.FALSE.equals(isAccountCrudServiceImplemented)) {
        throw new IllegalStateException(
                "L'instance AccountCrudService ne peut tre implment plus d'une fois.");
    }/*from  ww  w  .j  a  va 2s. c  om*/
    this.open();
    isAccountCrudServiceImplemented = Boolean.TRUE;
}