Example usage for org.apache.commons.lang3 StringUtils EMPTY

List of usage examples for org.apache.commons.lang3 StringUtils EMPTY

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils EMPTY.

Prototype

String EMPTY

To view the source code for org.apache.commons.lang3 StringUtils EMPTY.

Click Source Link

Document

The empty String "" .

Usage

From source file:com.ormanli.duplicatefinder.main.Worker.java

@Override
public void run() {
    try {/* w w  w  .  ja  v a2s .c  o  m*/
        List<File> fileList = fileUtil.getEntryList();

        if (fileList != null) {
            logger.info("Worker " + this.hashCode() + " list length " + fileList.size());
            for (File filePath : fileList) {
                String fileHash = fileUtil.getFileHash(filePath);
                logger.info("File: " + filePath + " Hash: " + fileHash);
                SQLExecuter.getInstance().insertToTables(fileHash, filePath.getCanonicalPath());
            }
        }
    } catch (Exception e) {
        logger.error(StringUtils.EMPTY, e);
    }
}

From source file:ch.cyberduck.ui.cocoa.SyncPromptController.java

@Override
public void setBrowserView(NSOutlineView view) {
    super.setBrowserView(view);
    {/*from w  ww  . j a  v  a  2  s .  c om*/
        NSTableColumn c = tableColumnsFactory.create(SyncPromptModel.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(SyncPromptModel.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:com.vrem.wifianalyzer.wifi.predicate.SSIDPredicateTest.java

@Test
public void testSSIDPredicate() throws Exception {
    // setup// ww  w  .j a  v a 2  s .c o m
    WiFiDetail wiFiDetail = new WiFiDetail(SSID, "bssid", "wpa", WiFiSignal.EMPTY, WiFiAdditional.EMPTY);
    // execute & validate
    assertTrue(new SSIDPredicate(SSID).evaluate(wiFiDetail));
    assertTrue(new SSIDPredicate("id").evaluate(wiFiDetail));
    assertTrue(new SSIDPredicate("ss").evaluate(wiFiDetail));
    assertTrue(new SSIDPredicate("s").evaluate(wiFiDetail));
    assertTrue(new SSIDPredicate(StringUtils.EMPTY).evaluate(wiFiDetail));

    assertFalse(new SSIDPredicate("SSID").evaluate(wiFiDetail));
    assertFalse(new SSIDPredicate("B").evaluate(wiFiDetail));
}

From source file:com.nridge.core.app.mail.Mail.java

/**
 * Convenience method that extracts a last name from an email address
 * formatted as 'first.last@company.com'.  The last name will have its
 * first letter capitalized.//from w w w .  j a va2s.co  m
 *
 * @param anEmailAddress Email address.
 *
 * @return Proper last name.
 */
public static String extractLastName(String anEmailAddress) {
    String lastName = StringUtils.EMPTY;

    if (StringUtils.isNotEmpty(anEmailAddress)) {
        int offset2 = anEmailAddress.indexOf(StrUtl.CHAR_AT);
        if (offset2 > 0) {
            int offset1 = anEmailAddress.indexOf(StrUtl.CHAR_DOT);
            if (offset1 > 0)
                lastName = StrUtl.firstCharToUpper(anEmailAddress.substring(offset1 + 1, offset2));
            else
                lastName = StrUtl.firstCharToUpper(anEmailAddress.substring(0, offset2));
        }
    }

    return lastName;
}

From source file:com.github.jknack.handlebars.helper.EachHelper.java

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override/* w  w  w. j a v a2  s. c o m*/
public CharSequence apply(final Object context, final Options options) throws IOException {
    if (context == null) {
        return StringUtils.EMPTY;
    }
    if (context instanceof Iterable) {
        return iterableContext((Iterable) context, options);
    }
    return hashContext(context, options);
}

From source file:com.vrem.wifianalyzer.wifi.model.ChannelRatingTest.java

@Before
public void setUp() {
    WiFiConnection wiFiConnection = new WiFiConnection("SSID1", "20:cf:30:ce:1d:71", "192.168.1.15", 11);
    wiFiDetail1 = new WiFiDetail("SSID1", "20:cf:30:ce:1d:71", StringUtils.EMPTY,
            new WiFiSignal(2432, 2432, WiFiWidth.MHZ_20, -50),
            new WiFiAdditional(StringUtils.EMPTY, wiFiConnection));
    wiFiDetail2 = new WiFiDetail("SSID2", "58:6d:8f:fa:ae:c0", StringUtils.EMPTY,
            new WiFiSignal(2442, 2442, WiFiWidth.MHZ_20, -70), WiFiAdditional.EMPTY);
    wiFiDetail3 = new WiFiDetail("SSID3", "84:94:8c:9d:40:68", StringUtils.EMPTY,
            new WiFiSignal(2452, 2452, WiFiWidth.MHZ_20, -60), WiFiAdditional.EMPTY);
    wiFiDetail4 = new WiFiDetail("SSID3", "64:A4:8c:90:10:12", StringUtils.EMPTY,
            new WiFiSignal(2452, 2452, WiFiWidth.MHZ_20, -80), WiFiAdditional.EMPTY);
    fixture = new ChannelRating();
}

From source file:com.msg.wmTestHelper.pojo.ProcessModel.java

/**
 * Crops the Model name, they are predefined into segments divided by '_'.
 *
 * @return the technical number name only.
 *//*from ww  w.  j  a  v  a  2  s.  c o m*/
public String cropModelName() {
    if (modelName != null) {
        return modelName.split("_")[0];
    }

    return StringUtils.EMPTY;
}

From source file:de.bund.bva.isyfact.benutzerverwaltung.sicherheit.BenutzerverwaltungAufrufKontextImpl.java

@Override
public String getDurchfuehrenderSachbearbeiterName() {
    if (super.getDurchfuehrenderSachbearbeiterName() == null) {
        return StringUtils.EMPTY;
    }// ww  w.j a v  a  2 s .c om
    return super.getDurchfuehrenderSachbearbeiterName();
}

From source file:com.aqnote.app.wifianalyzer.wifi.model.WiFiConnection.java

public WiFiConnection(@NonNull String SSID, @NonNull String BSSID) {
    this(SSID, BSSID, StringUtils.EMPTY, LINK_SPEED_INVALID);
}

From source file:com.baifendian.swordfish.common.utils.http.HttpUtil.java

/**
 *  md5//from   w  ww .  j a va2  s.co  m
 */
public static String getMd5(String raw) {
    if (raw == null) {
        raw = StringUtils.EMPTY;
    }

    return DigestUtils.md5Hex(raw);
}