List of usage examples for java.lang Boolean FALSE
Boolean FALSE
To view the source code for java.lang Boolean FALSE.
Click Source Link
From source file:net.ceos.project.poi.annotated.bean.MultiTypeObjectBuilder.java
/** * Create a MultiTypeObject for tests./* w w w .jav a2 s . co m*/ * * @return the {@link MultiTypeObject} */ public static MultiTypeObject buildMultiTypeObject(int multiplier) { MultiTypeObject toValidate = new MultiTypeObject(); toValidate.setDateAttribute(new Date()); toValidate.setLocalDateAttribute(LocalDate.now()); toValidate.setLocalDateTimeAttribute(LocalDateTime.now()); toValidate.setStringAttribute("some string"); 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"); job.setJobName("Job Name"); toValidate.setJob(job); toValidate.setIntegerPrimitiveAttribute(121 * multiplier); toValidate.setDoublePrimitiveAttribute(44.6 * multiplier); toValidate.setLongPrimitiveAttribute(987654321L * multiplier); toValidate.setBooleanPrimitiveAttribute(true); /* create sub object AddressInfo */ AddressInfo ai = new AddressInfo(); ai.setAddress("this is the street"); ai.setNumber(99); ai.setCity("this is the city"); ai.setCityCode(70065); ai.setCountry("This is a Country"); toValidate.setAddressInfo(ai); toValidate.setFloatAttribute(14.765f * multiplier); toValidate.setFloatPrimitiveAttribute(11.1125f * multiplier); toValidate.setUnitFamily(UnitFamily.COMPONENTS); toValidate.setBigDecimalAttribute(BigDecimal.valueOf(24.777).multiply(BigDecimal.valueOf(multiplier))); toValidate.setShortAttribute((short) 17); toValidate.setShortPrimitiveAttribute((short) 4); // TODO add new fields below return toValidate; }
From source file:com.chiralbehaviors.CoRE.Ruleform.java
public static Boolean toBoolean(Integer value) { if (value == null) { return null; }//www. ja v a 2 s. c o m return value.equals(Integer.valueOf(0)) ? Boolean.FALSE : Boolean.TRUE; }
From source file:com.omertron.yamjtrakttv.model.Credentials.java
public Credentials() { this.username = ""; this.password = ""; this.apikey = ""; this.valid = Boolean.FALSE; this.validMessage = ""; }
From source file:ch.gbrain.gwtstorage.test.model.TestItem.java
@JsonIgnore public TestItem(String id) { this.setId(id); this.setNumericValue(2); this.setBoolValue(Boolean.FALSE); }
From source file:com.pureinfo.srm.view.function.ShowDupTagCheckBoxFunctionHandler.java
public Object perform(Object[] _args, IDVContext _context) throws PureException { Object[] arrObj = new Object[2]; String sFormal = (String) _args[0]; System.out.println("<<<<<<<<<<<<<<<<<<<<<" + sFormal); IProductMgr mgr = (IProductMgr) ArkContentHelper.getContentMgrOf(SRMTypes.PRODUCT); boolean isFormal = StringUtils.isNotEmpty(sFormal) ? (sFormal.equalsIgnoreCase("true") ? Boolean.TRUE.booleanValue() : Boolean.FALSE.booleanValue()) : false;//from w ww. ja v a 2 s .c o m System.out.println(">>>>>>>>>>>>>>>>>>>>>" + isFormal); arrObj = mgr.renderTableOfDupTagCheckBox(isFormal); return arrObj[0].toString(); }
From source file:org.dbrain.data.jackson.serializers.JacksonSerializationUtils.java
public static Value parseValue(JsonParser parser, DeserializationContext ctxt) throws IOException { JsonToken token = getToken(parser);//from ww w .j a v a 2s . c o m if (token != null) { Value result; switch (token) { case VALUE_STRING: result = Value.of(parser.getValueAsString()); break; case VALUE_NUMBER_FLOAT: result = Value.of(parser.getDoubleValue()); break; case VALUE_NUMBER_INT: result = Value.of(parser.getBigIntegerValue()); break; case VALUE_NULL: result = NullValueImpl.NULL; break; case VALUE_TRUE: result = Value.of(Boolean.TRUE); break; case VALUE_FALSE: result = Value.of(Boolean.FALSE); break; case START_OBJECT: { ValueMap values = ValueMap.newInstance(); while (parser.nextToken() == JsonToken.FIELD_NAME) { String key = parser.getCurrentName(); parser.nextToken(); Value v = parseValue(parser, ctxt); if (v == null) { throw ctxt.wrongTokenException(parser, JsonToken.START_OBJECT, "Expected Value"); } values.put(key, v); } if (getToken(parser) == JsonToken.END_OBJECT) { parser.clearCurrentToken(); } else { throw ctxt.wrongTokenException(parser, JsonToken.END_OBJECT, null); } result = values; } break; case START_ARRAY: { ValueList values = ValueList.newInstance(); while (parser.nextToken() != JsonToken.END_ARRAY) { Value v = parseValue(parser, ctxt); if (v == null) { throw ctxt.wrongTokenException(parser, JsonToken.START_OBJECT, "Expected Value"); } values.add(v); } if (getToken(parser) == JsonToken.END_ARRAY) { parser.clearCurrentToken(); } else { throw ctxt.wrongTokenException(parser, JsonToken.END_ARRAY, null); } result = values; } break; default: throw ctxt.wrongTokenException(parser, JsonToken.START_OBJECT, "Expected Value"); } return result; } else { return null; } }
From source file:com.basistech.rosette.apimodel.ModelTest.java
@Parameterized.Parameters(name = "inputStreamContent: {0}") public static Collection<Object[]> data() { return Lists.newArrayList(new Object[] { Boolean.FALSE }, new Object[] { Boolean.TRUE }); }
From source file:com.betel.flowers.web.bean.util.UploadFileRun.java
@Override public void run() { Boolean succesefull = Boolean.FALSE; Path path = Paths.get(url); //if directory exists? if (!Files.exists(path)) { try {/*from w w w . ja va 2 s .co m*/ Files.createDirectories(path); log.log(Level.INFO, "Directory is created!"); } catch (IOException e) { //fail to create directory log.log(Level.SEVERE, "Failed to create directory! " + e.getMessage()); } } File fileDelete = new File(url + name + "." + ext); if (fileDelete.delete()) { log.log(Level.INFO, "Se elimino el archivo: " + url + name + "." + ext); } else { log.log(Level.INFO, "No se elimino el archivo: " + url + name + "." + ext); } File file = new File(url + name + "." + ext); try { byte[] imgbytes = IOUtils.toByteArray(input); InputStream in = new ByteArrayInputStream(imgbytes); BufferedImage bImageFromConvert = ImageIO.read(in); ImageIO.write(bImageFromConvert, ext, file); succesefull = Boolean.TRUE; } catch (IOException e) { log.log(Level.SEVERE, "Error al guardar la imagen en:" + file.getPath(), e); } if (succesefull) { try { this.finalize(); this.exito = true; } catch (Throwable ex) { log.log(Level.SEVERE, "Error al procesar imagen", ex); } } else { this.interrupt(); this.exito = false; } }
From source file:net.ceos.project.poi.annotated.bean.cascade.CascadeObjectBuilder.java
/** * Create a CascadeObject for tests.//from www . j av a2 s . c om * * @return the {@link CascadeObject} */ public static CascadeObject buildCascadeObject(int multiplier) { CascadeObject toValidate = new CascadeObject(); toValidate.setDateAttribute(new Date()); toValidate.setStringAttribute("some string"); 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"); job.setJobName("Job Name"); toValidate.setJob(job); BasicObject bo = BasicObjectBuilder.buildBasicObject(); List<BasicObject> boList = new ArrayList<>(); boList.add(bo); boList.add(bo); boList.add(bo); boList.add(bo); boList.add(bo); toValidate.setBasicObjectList(boList); ObjectConfigurable oc = ObjectConfigurableBuilder.buildObjectConfigurable(); ArrayList<ObjectConfigurable> ocList = new ArrayList<>(); ocList.add(oc); ocList.add(oc); ocList.add(oc); toValidate.setObjectConfList(ocList); CascadeL1 l1 = CascadeL1Builder.buildCascadeL1(); ArrayList<CascadeL1> objectsList = new ArrayList<>(); objectsList.add(l1); objectsList.add(l1); toValidate.setObjectsList(objectsList); /*ArrayList<CascadeObject> ownList = new ArrayList<>(); ownList.add(toValidate); ownList.add(toValidate); toValidate.setObjectsList(ownList);*/ // TODO add new fields below return toValidate; }
From source file:com.redhat.rhn.frontend.struts.ActionChainHelper.java
/** * Looks in the form contents and returns a (new or existing) ActionChain iff * user has selected one in schedule-options.jspf. * * @param form the form object//from w w w. java2 s . co m * @param user the user * @return the action chain */ public static ActionChain readActionChain(DynaActionForm form, User user) { if (Boolean.FALSE.equals(form.get(DatePicker.USE_DATE))) { String label = sanitizeLabel((String) form.get(LABEL_PROPERTY_NAME)); if (!StringUtils.isBlank(label)) { log.debug("Reading Action Chain from label " + label); return ActionChainFactory.getOrCreateActionChain(label, user); } } return null; }