package couk.doridori.android.lib.util;

import android.content.Intent;

/**
 * @author Dorian Cussen
 *         Date: 29/11/2012
 */
public class Verifier
{
    public static boolean anyNull(Object... objects){
        for(Object o : objects){
            if(null == o)
                return true;
        }

        return false;
    }

    public static boolean anyIntentKeysMissing(Intent intent, String... keys){
        for(String key : keys){
            if(!intent.getExtras().containsKey(key))
                return true;
        }

        return false;
    }


}

@@ -165,31 +165,28 @@
 blic static 
-boolean
+void
  anyNull(Obj
@@ -204,40 +204,85 @@
 cts)
-%7B%0A        for(Object o : objects
+ throws NullPointerException %7B%0A        for(int i = 0; i %3C objects.length; i++
 )%7B%0A 
@@ -304,17 +304,27 @@
 ull == o
-)
+bjects%5Bi%5D)%7B
 %0A       
@@ -336,53 +336,164 @@
     
-return true;%0A        %7D%0A%0A        return false;
+String errorMsg = %22Arg %22+i+%22 == null!!%22;%0A                XLog.e(errorMsg);%0A                throw new NullPointerException(errorMsg);%0A            %7D%0A        %7D
 %0A   

throw exception on verifier