Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

public class Main {
    /**
     * Ensures that the object passed is not null.
     *
     * @param object   The object nullable.
     * @param property The property.
     */
    public static void notNull(@Nullable Object object, @NonNull String property) {
        if (object == null) {
            throw new NullPointerException(property + " == null");
        }
    }
}