// Path: src/com/dexode/util/Assert.java
// public class Assert {
// 	public static void check(boolean value) {
// 		check(value, null);
// 	}
// 
// 	public static void check(boolean value, @Nullable String message) {
// 		if (value) {
// 			return;
// 		}
// 		throw new AssertionError(message);
// 	}
// }


import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import com.dexode.util.Assert;
package com.dexode.adapter;



/**
 * Created by Dawid Drozd aka Gelldur on 09.02.15.
 */
public class ViewHolderAdapterHelper {

	public ViewHolderAdapterHelper(final Adapter adapter) {
		_adapter = adapter;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		Object holder = null;

		if (convertView == null || convertView.getTag() == null) {
			convertView = _adapter.getInflatedRow(position, parent);
			holder = _adapter.getNewHolder(position);
			_adapter.inflateHolder(holder, convertView, position);
			convertView.setTag(holder);
		} else {
			holder = convertView.getTag();
		}

		final View view = _adapter.setHolder(holder, convertView, parent, position);
// Path: src/com/dexode/util/Assert.java
// public class Assert {
// 	public static void check(boolean value) {
// 		check(value, null);
// 	}
// 
// 	public static void check(boolean value, @Nullable String message) {
// 		if (value) {
// 			return;
// 		}
// 		throw new AssertionError(message);
// 	}
// }


// Path: src/com/dexode/adapter/ViewHolderAdapterHelper.java
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import com.dexode.util.Assert;

package com.dexode.adapter;



/**
 * Created by Dawid Drozd aka Gelldur on 09.02.15.
 */
public class ViewHolderAdapterHelper {

	public ViewHolderAdapterHelper(final Adapter adapter) {
		_adapter = adapter;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		Object holder = null;

		if (convertView == null || convertView.getTag() == null) {
			convertView = _adapter.getInflatedRow(position, parent);
			holder = _adapter.getNewHolder(position);
			_adapter.inflateHolder(holder, convertView, position);
			convertView.setTag(holder);
		} else {
			holder = convertView.getTag();
		}

		final View view = _adapter.setHolder(holder, convertView, parent, position);
		Assert.check(view != null, "setHolder must return view");