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:com.moviejukebox.tools.PropertiesUtil.java

/**
 * Set the properties filename/*from ww  w .ja  v a 2  s  .co  m*/
 *
 * @param streamName
 * @return
 */
public static boolean setPropertiesStreamName(String streamName) {
    return setPropertiesStreamName(streamName, Boolean.TRUE);
}

From source file:net.myrrix.common.random.RandomManager.java

/**
 * @return a new, seeded {@link RandomGenerator}
 *//*from   w  w w. jav a 2 s.  c om*/
public static RandomGenerator getRandom() {
    if (useTestSeed) {
        // No need to track instances anymore
        return new MersenneTwister(TEST_SEED);
    }
    RandomGenerator random = new MersenneTwister();
    synchronized (INSTANCES) {
        INSTANCES.put(random, Boolean.TRUE);
    }
    return random;
}

From source file:fr.mailjet.event.JsonProcessingTest.java

@Parameters
static public Collection<Object[]> parameters() {
    List<Object[]> parameters = new ArrayList<Object[]>();
    parameters.add(new Object[] { new ClickMailjetEvent("click", 1344859910L, "olivier.pitton@gmail.com",
            "390319834", "241755226", null, "82.229.159.100", "FR",
            "http://www.infoq.com/articles/azul_gc_in_detail",
            "Mozilla\5.0 (X11; Linux x86_64) AppleWebKit\537.1 (KHTML, like Gecko) Chrome\21.0.1180.75 Safari\537.1") });
    parameters.add(new Object[] { new OpenMailjetEvent("open", 1344859910L, "olivier.pitton@gmail.com",
            "390319834", "241755226", null, "82.229.159.100", "FR",
            "Mozilla\5.0 (X11; Linux x86_64) AppleWebKit\537.1 (KHTML, like Gecko) Chrome\21.0.1180.75 Safari\537.1") });
    parameters.add(new Object[] { new BlockMailjetEvent("block", 1344859910L, "olivier.pitton@gmail.com",
            "390319834", "241755226", null, "destinataire", "user unknown") });
    parameters.add(new Object[] { new BounceMailjetEvent("bounce", 1344859910L, "olivier.pitton@gmail.com",
            "390319834", "241755226", null, "destinataire", "user unknown", Boolean.TRUE, Boolean.TRUE) });
    parameters.add(new Object[] { new SpamMailjetEvent("spam", 1344859910L, "olivier.pitton@gmail.com",
            "390319834", "241755226", null, "dummysource") });
    parameters.add(//from   w ww .  j a va2s. c  o  m
            new Object[] { new TypoFixMailjetEvent("typofix", 1344859910L, "192.168.45.67", "10.23.45.54") });
    return parameters;
}

From source file:net.di2e.ecdr.commons.query.cache.QueryRequestCache.java

public void add(String id) {
    cache.put(id, Boolean.TRUE);
}

From source file:com.multimedia.service.locale.CmsLocaleServiceImpl.java

@Override
public Locale getInsertBean(Locale obj) {
    if (obj == null)
        obj = new Locale();
    Long sort = (Long) service.getSinglePropertyU("max(sort)");
    if (sort == null)
        sort = Long.valueOf(0);/* w ww . ja  va  2  s .  co  m*/
    else
        sort++;
    obj.setSort(sort);
    obj.setActive(Boolean.TRUE);
    return obj;
}

From source file:eu.planets_project.tb.impl.serialization.JaxbUtil.java

/**
* Marshalling via Jaxb: Creates a String Serialization of the requested class for
* the content of Object objectToSerialize. The provided object and the requested class need to be of the same Type
* @param <T>/*w w  w. ja  v a 2  s.  co  m*/
* @param objectClass
* @param objectToSerialize
* @return
* @throws Exception
*/
public static <T> String marshallObjectwithJAXB(Class<T> objectClass, T objectToSerialize) throws Exception {
    JAXBContext context;
    try {
        context = JAXBContext.newInstance(objectClass);
        Marshaller m = context.createMarshaller();
        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
        StringWriter sw = new StringWriter();
        //now call the actual marshalling job
        m.marshal(objectToSerialize, sw);
        return sw.toString();
    } catch (Exception e) {
        log.error("marshalWorkflowResult failed for objectClass: " + objectClass + " with " + e);
        throw e;
    }
}

From source file:Main.java

/**
 * <p>Converts an Integer to a Boolean using the convention that {@code zero}
 * is {@code false}.</p>//from www. jav  a2 s .co m
 *
 * <p>{@code null} will be converted to {@code null}.</p>
 *
 * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed to a boolean. </p>
 *
 * <pre>
 *   BooleanUtils.toBoolean(Integer.valueOf(0))    = Boolean.FALSE
 *   BooleanUtils.toBoolean(Integer.valueOf(1))    = Boolean.TRUE
 *   BooleanUtils.toBoolean(Integer.valueOf(null)) = null
 * </pre>
 *
 * @param value  the Integer to convert
 * @return Boolean.TRUE if non-zero, Boolean.FALSE if zero,
 *  {@code null} if {@code null} input
 */
public static Boolean toBooleanObject(Integer value) {
    if (value == null) {
        return null;
    }
    return value.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE;
}

From source file:com.hp.test.framework.runner.Runallthetests.java

@BeforeTest
public void pres(ITestContext ctx) throws JellyException, FileNotFoundException {
    context = new JellyContext();
    context.setVariable("xpath", new XpathSupport());
    context.setVariable("env", System.getProperties());
    context.setVariable("outcome", Boolean.TRUE);
    //         Map<String,String> suiteName_list = ctx.getCurrentXmlTest().getTestParameters();
    //             for(String a:suiteName_list.keySet())
    //             System.out.println("key"+a+"value"+suiteName_list.get(a));

}

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);// w  w w. j  a  v a 2  s. c  om
        this.ds.save(usuario);
        exito = Boolean.TRUE;
    }
    return exito;
}

From source file:de.micromata.genome.gwiki.plugin.s5slideshow_1_0.GWikiSlideIncrementPatcherFragmentVisitor.java

protected boolean isDisabled() {
    if (disableStack.isEmpty() == true) {
        return false;
    }// ww w  . j  a  va  2 s  . co  m
    return disableStack.peek() == Boolean.TRUE;
}