List of usage examples for org.apache.commons.lang3 StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang3 StringUtils EMPTY.
Click Source Link
From source file:com.github.haixing_hu.csl.Link.java
/** * Default constructs a {@link Link}. */ public Link() { href = StringUtils.EMPTY; rel = StringUtils.EMPTY; }
From source file:ch.cyberduck.ui.cocoa.controller.SyncPromptController.java
@Override public void setBrowserView(NSOutlineView view) { super.setBrowserView(view); {/*ww w . j a v a2s.c o m*/ NSTableColumn c = tableColumnsFactory.create(SyncPromptDataSource.Column.sync.name()); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(20f); c.setWidth(20f); c.setMaxWidth(20f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setEditable(false); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); view.addTableColumn(c); } { NSTableColumn c = tableColumnsFactory.create(SyncPromptDataSource.Column.create.name()); c.headerCell().setStringValue(StringUtils.EMPTY); c.setMinWidth(20f); c.setWidth(20f); c.setMaxWidth(20f); c.setResizingMask(NSTableColumn.NSTableColumnAutoresizingMask); c.setEditable(false); c.setDataCell(imageCellPrototype); c.dataCell().setAlignment(NSText.NSCenterTextAlignment); view.addTableColumn(c); } view.sizeToFit(); }
From source file:fm.audiobox.core.exceptions.Errors.java
@Override public String toString() { if (getError() == null) { return StringUtils.EMPTY; } else {//from w w w . j av a 2s . com return getError() + ": " + getErrorDescription(); } }
From source file:de.blizzy.documentr.util.Util.java
/** * Converts a text so that it can be used as a URL component. For example, the text * "<code>My Funny Valentine</code>" will be converted to * "<code>my-funny-valentine</code>". This method is useful to convert * page titles to page path components.//from ww w . j ava 2 s. c o m */ public static String simplifyForUrl(String text) { PagePathValidator validator = new PagePathValidator(); StringBuilder buf = new StringBuilder(); int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); if (StringUtils.contains(CHARS_TO_DASH, c)) { buf.append("-"); //$NON-NLS-1$ } else { buf.append(c); if (!validator.isValid(buf.toString(), null)) { buf.deleteCharAt(buf.length() - 1); } } } String name = buf.toString().replaceAll("--", "-") //$NON-NLS-1$ //$NON-NLS-2$ .replaceAll("^-", StringUtils.EMPTY) //$NON-NLS-1$ .replaceAll("-$", StringUtils.EMPTY) //$NON-NLS-1$ .toLowerCase(); return name; }
From source file:de.blizzy.documentr.markdown.macro.impl.TabData.java
String renderTab(String id, boolean active) { return "<li" + (active ? " class=\"active\"" : StringUtils.EMPTY) + ">" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ "<a href=\"#" + id + "\" data-toggle=\"tab\">" + //$NON-NLS-1$ //$NON-NLS-2$ StringEscapeUtils.escapeHtml4(title) + "</a>" + //$NON-NLS-1$ "</li>"; //$NON-NLS-1$ }
From source file:com.msg.wmTestHelper.metaModel.AbstractExtractor.java
/** * Extracts a <code><value></code> element where the attribute name is like elementName. * * @param element the XML element./*from w w w . ja v a 2s .c om*/ * @param elementName the name attribute value. * @return */ protected String extractPlainValue(Element element, String elementName) { Node nodeStepLabel = element.selectSingleNode(".//value[@name='" + elementName + "']"); if (nodeStepLabel != null && StringUtils.isNotEmpty(nodeStepLabel.getText())) { return nodeStepLabel.getText(); } log.warn("Value '{}' not given for element {} {}", elementName, element.getUniquePath(), element.getDocument().getName()); return StringUtils.EMPTY; }
From source file:com.github.haixing_hu.data.model.common.Name.java
/** * Constructs an empty {@link Name}. */ public Name() { given = StringUtils.EMPTY; middle = null; display = null; family = StringUtils.EMPTY; }
From source file:com.inkubator.hrm.web.converter.PaySalaryComponentConverter.java
@Override public String getAsString(FacesContext context, UIComponent component, Object value) { ResourceBundle resourceBundle = ResourceBundle.getBundle("Messages", new Locale(FacesUtil.getSessionAttribute(HRMConstant.BAHASA_ACTIVE).toString())); String messages = StringUtils.EMPTY; Integer data = (Integer) value; if (Objects.equals(data, HRMConstant.PAY_SALARY_COMPONENT_TUNJANGAN)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_tunjangan"); } else if (Objects.equals(data, HRMConstant.PAY_SALARY_COMPONENT_POTONGAN)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_potongan"); } else if (Objects.equals(data, HRMConstant.PAY_SALARY_COMPONENT_SUBSIDI)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_subsidi"); }/* w w w .j a v a 2 s . co m*/ return messages; }
From source file:com.vrem.wifianalyzer.wifi.channelgraph.ChannelAxisLabel.java
@Override public String formatLabel(double value, boolean isValueX) { String result = StringUtils.EMPTY; int valueAsInt = (int) (value + (value < 0 ? -0.5 : 0.5)); if (isValueX) { result += findChannel(valueAsInt); } else {/*from w w w . j a va2 s . c om*/ if (valueAsInt <= MAX_Y && valueAsInt > MIN_Y) { result += valueAsInt; } } return result; }
From source file:com.github.haixing_hu.csl.Rights.java
/** * Default constructs a {@link Rights} object. */ public Rights() { license = null; content = StringUtils.EMPTY; }