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.vrem.wifianalyzer.wifi.timegraph.TimeAxisLabel.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) {
        if (valueAsInt > 0 && valueAsInt % 2 == 0) {
            result += valueAsInt;/*from ww  w  .ja  v  a  2  s .c  o  m*/
        }
    } else {
        if (valueAsInt <= MAX_Y && valueAsInt > MIN_Y) {
            result += valueAsInt;
        }
    }
    return result;
}

From source file:com.aqnote.app.wifianalyzer.wifi.graph.time.TimeAxisLabel.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) {
        if (valueAsInt > 0 && valueAsInt % 2 == 0) {
            result += valueAsInt;// w  w  w.  j a v a2  s.co  m
        }
    } else {
        if (valueAsInt <= GraphViewBuilder.MAX_Y && valueAsInt > GraphViewBuilder.MIN_Y) {
            result += valueAsInt;
        }
    }
    return result;
}

From source file:de.blizzy.documentr.validation.LoginNameValidatorTest.java

@Test
public void isValid() {
    LoginNameValidator validator = new LoginNameValidator();
    assertTrue(validator.isValid(null, null));
    assertTrue(validator.isValid(StringUtils.EMPTY, null));
    assertTrue(validator.isValid("admin", null)); //$NON-NLS-1$
    assertFalse(validator.isValid("x/y", null)); //$NON-NLS-1$
    assertFalse(validator.isValid("x,y", null)); //$NON-NLS-1$
}

From source file:de.blizzy.documentr.validation.PagePathValidatorTest.java

@Test
public void isValid() {
    PagePathValidator validator = new PagePathValidator();
    assertTrue(validator.isValid(null, null));
    assertTrue(validator.isValid(StringUtils.EMPTY, null));
    assertTrue(validator.isValid("foo", null)); //$NON-NLS-1$
    assertTrue(validator.isValid("foo/bar", null)); //$NON-NLS-1$
    assertTrue(validator.isValid("foo,bar", null)); //$NON-NLS-1$
    assertFalse(validator.isValid(".foo", null)); //$NON-NLS-1$
    assertFalse(validator.isValid("foo/.bar", null)); //$NON-NLS-1$
}

From source file:de.blizzy.documentr.validation.BranchNameValidatorTest.java

@Test
public void isValid() {
    BranchNameValidator validator = new BranchNameValidator();
    assertTrue(validator.isValid(null, null));
    assertTrue(validator.isValid(StringUtils.EMPTY, null));
    assertTrue(validator.isValid("branch", null)); //$NON-NLS-1$
    assertTrue(validator.isValid("My-Branch_1.2.3", null)); //$NON-NLS-1$
    assertFalse(validator.isValid("1,2,3", null)); //$NON-NLS-1$
}

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

public static String convertIpAddress(int ipAddress) {
    try {//from   w w  w.  jav a2 s. com
        byte[] bytes = BigInteger.valueOf(ipAddress).toByteArray();
        ArrayUtils.reverse(bytes);
        return InetAddress.getByAddress(bytes).getHostAddress();
    } catch (Exception e) {
        return StringUtils.EMPTY;
    }
}

From source file:com.inkubator.hrm.web.converter.CompanyConverter.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 message = StringUtils.EMPTY;
    String data = (String) value;
    if (Objects.equals(data, HRMConstant.ORGANIZATION_LEVEL_HOLDING)) {
        message = resourceBundle.getString("organization.holding");
    } else if (Objects.equals(data, HRMConstant.ORGANIZATION_LEVEL_COMPANY)) {
        message = resourceBundle.getString("organization.company");
    }// w w w.j av a2s  . c o  m

    return message;
}

From source file:de.blizzy.documentr.validation.ProjectNameValidatorTest.java

@Test
public void isValid() {
    ProjectNameValidator validator = new ProjectNameValidator();
    assertTrue(validator.isValid(null, null));
    assertTrue(validator.isValid(StringUtils.EMPTY, null));
    assertTrue(validator.isValid("project", null)); //$NON-NLS-1$
    assertTrue(validator.isValid("My-Project_123", null)); //$NON-NLS-1$
    assertFalse(validator.isValid("1,2,3", null)); //$NON-NLS-1$
}

From source file:com.aqnote.app.wifianalyzer.vendor.model.VendorNameUtilsTest.java

@Test
public void testCleanVendorNameWithNull() throws Exception {
    // execute/*from   ww w  . ja va 2s  .  co m*/
    String actual = VendorNameUtils.cleanVendorName(null);
    // validate
    assertEquals(StringUtils.EMPTY, actual);
}

From source file:com.alliander.osgp.shared.usermanagement.ApiResponse.java

public void setApiResponseToSuccessful() {
    this.setFeedbackMessage("OK");
    this.setErrorMessage(StringUtils.EMPTY);
}