Example usage for org.apache.shiro.util Assert hasText

List of usage examples for org.apache.shiro.util Assert hasText

Introduction

In this page you can find the example usage for org.apache.shiro.util Assert hasText.

Prototype

public static void hasText(String text, String message) 

Source Link

Document

Assert that the given String has valid text content; that is, it must not be null and must contain at least one non-whitespace character.

Usage

From source file:example.app.model.ISBN.java

License:Apache License

public static ISBN of(String number) {

    Assert.hasText(number, String.format("Number [%s] is required", number));

    return new ISBN(number);
}