// Path: lib-core/src/main/java/xdroid/core/ObjectUtils.java
// public static <T> T notNull(T object) {
//     if (object == null) {
//         throw new NullPointerException();
//     }
// 
//     return object;
// }


import android.content.Context;
import android.database.Cursor;
import android.util.SparseIntArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import static xdroid.core.ObjectUtils.notNull;

    public void setLayoutId(int layoutId) {
        putLayoutId(0, layoutId);
    }

    public void putLayoutId(int viewType, int layoutId) {
        mLayoutId.put(viewType, layoutId);
        notifyDataSetChanged();
    }

    @SuppressWarnings("unused")
    public void lockChanges() {
        mChangesLocked = true;
    }

    @SuppressWarnings("unused")
    public void unlockChanges() {
        mChangesLocked = false;
    }

    @Override
    public void notifyDataSetChanged() {
        if (!mChangesLocked) {
            super.notifyDataSetChanged();
        }
    }

    @Override
    @SuppressWarnings("unchecked")
    public V newView(Context context, Cursor cursor, ViewGroup parent) {
// Path: lib-core/src/main/java/xdroid/core/ObjectUtils.java
// public static <T> T notNull(T object) {
//     if (object == null) {
//         throw new NullPointerException();
//     }
// 
//     return object;
// }


// Path: lib-adapter/src/main/java/xdroid/adapter/CursorAdapterX.java
import android.content.Context;
import android.database.Cursor;
import android.util.SparseIntArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import static xdroid.core.ObjectUtils.notNull;


    public void setLayoutId(int layoutId) {
        putLayoutId(0, layoutId);
    }

    public void putLayoutId(int viewType, int layoutId) {
        mLayoutId.put(viewType, layoutId);
        notifyDataSetChanged();
    }

    @SuppressWarnings("unused")
    public void lockChanges() {
        mChangesLocked = true;
    }

    @SuppressWarnings("unused")
    public void unlockChanges() {
        mChangesLocked = false;
    }

    @Override
    public void notifyDataSetChanged() {
        if (!mChangesLocked) {
            super.notifyDataSetChanged();
        }
    }

    @Override
    @SuppressWarnings("unchecked")
    public V newView(Context context, Cursor cursor, ViewGroup parent) {
        V result = (V) LayoutInflater.from(notNull(parent.getContext()))