Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.support.annotation.NonNull;

import android.text.TextUtils;

public class Main {
    public static void assertNotEmpty(String text, String parameterName) throws AssertionError {
        check(TextUtils.isEmpty(text) || TextUtils.isEmpty(text.trim()), parameterName + " can't be empty.");
    }

    public static void check(boolean b, @NonNull String message) {
        if (b)
            throw new AssertionError(message);
    }
}