Example usage for org.springframework.util StringUtils containsWhitespace

List of usage examples for org.springframework.util StringUtils containsWhitespace

Introduction

In this page you can find the example usage for org.springframework.util StringUtils containsWhitespace.

Prototype

public static boolean containsWhitespace(@Nullable String str) 

Source Link

Document

Check whether the given String contains any whitespace characters.

Usage

From source file:me.adaptive.core.data.api.UserRegistrationService.java

private boolean isValidEmail(String email) {
    return !StringUtils.isEmpty(email) && !StringUtils.containsWhitespace(email) && email.contains("@"); //TODO do a better check
}