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;

public class Main {
    public static <T> void assertNotEquals(@NonNull T object, @NonNull T anotherObject,
            @NonNull String parameterName) throws AssertionError {
        check(object == anotherObject || object.equals(anotherObject),
                parameterName + " can't be equal to " + String.valueOf(anotherObject) + ".");
    }

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