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:Main.java
/** * Normalize and pretty-print XML so that it can be compared using string * compare. The following code does the following: - Removes comments - * Makes sure attributes are ordered consistently - Trims every element - * Pretty print the document/*from w w w.jav a 2 s. c om*/ * * @param xml The XML to be normalized * @return The equivalent XML, but now normalized */ public static String normalizeXML(String xml) throws Exception { // Remove all white space adjoining tags ("trim all elements") xml = xml.replaceAll("\\s*<", "<"); xml = xml.replaceAll(">\\s*", ">"); DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); DOMImplementationLS domLS = (DOMImplementationLS) registry.getDOMImplementation("LS"); LSParser lsParser = domLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); LSInput input = domLS.createLSInput(); input.setStringData(xml); Document document = lsParser.parse(input); LSSerializer lsSerializer = domLS.createLSSerializer(); lsSerializer.getDomConfig().setParameter("comments", Boolean.FALSE); lsSerializer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE); return lsSerializer.writeToString(document); }
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 .java 2 s . c o m this.open(); isAccountCrudServiceImplemented = Boolean.TRUE; }
From source file:com.omertron.yamjtrakttv.model.Episode.java
public Episode() { this.season = 0; this.episode = 0; this.watched = Boolean.FALSE; this.watchedDate = null; }
From source file:com.mmj.app.lucene.analyzer.AbstractWordAnalyzer.java
/** * ?? -- ???//w ww.ja va 2 s .com * * @param input * @return */ @Override public List<String> segWords(String input) { return segWords(input, Boolean.FALSE); }
From source file:org.springframework.data.convert.JsonBooleanDeserializer.java
@Override public Boolean deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { JsonToken currentToken = jp.getCurrentToken(); if (currentToken.equals(JsonToken.VALUE_STRING)) { String text = jp.getText().trim(); if (YES.equalsIgnoreCase(text)) { return Boolean.TRUE; } else if (NO.equalsIgnoreCase(text)) { return Boolean.FALSE; }/* w ww . j a v a2 s. co m*/ throw ctxt.weirdStringException(text, Boolean.class, "Only \"" + YES + "\" or \"" + NO + "\" values supported"); } else if (currentToken.equals(JsonToken.VALUE_NULL)) { return getNullValue(); } throw ctxt.mappingException(Boolean.class); }
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 a 2s .com*/ * * <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:be.ugent.maf.cellmissy.gui.view.renderer.jfreechart.DirectionAutocorrelationLineAndShapeRenderer.java
@Override public Boolean getSeriesLinesVisible(int series) { if (series == 0) { return Boolean.TRUE; }/*ww w . j a v a 2s . c o m*/ return Boolean.FALSE; }
From source file:org.openmrs.module.odkconnector.web.controller.reporting.ManagePropertyController.java
@RequestMapping(method = RequestMethod.GET) public void preparePage(final Model model) { CohortDefinitionService definitionService = Context.getService(CohortDefinitionService.class); model.addAttribute("cohortDefinitions", definitionService.getAllDefinitions(Boolean.FALSE)); }
From source file:com.omertron.yamjtrakttv.model.SummaryInfo.java
public SummaryInfo() { this.rating = null; this.inCollection = Boolean.FALSE; this.inWatchlist = Boolean.FALSE; this.watched = Boolean.FALSE; this.plays = 0; }
From source file:com.omertron.yamjtrakttv.model.Credentials.java
public Credentials(String username, String password, String apikey) { this.username = username; this.password = password; this.apikey = apikey; this.valid = Boolean.FALSE; this.validMessage = ""; }