<commit_before>/*
 * ArrayRecyclerAdapter.kt
 *
 * Author: <NAME>
 * Copyright (c) 2015 <NAME>
 * Refer to LICENSE for details
 */

package com.nkming.utils.widget

import android.content.Context
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.nkming.utils.Log
import java.util.*

/**
 * Derived class of RecyclerView.Adapter that looks similar to the original
 * ArrayAdapter. Filter is not supported
 */
class ArrayRecyclerAdapter<_ItemT, _ViewHolderT>(
		context: Context, resource: Int, textViewResourceId: Int,
		objects: MutableList<_ItemT>,
		factory: (root: View, text: TextView) -> _ViewHolderT)
		: RecyclerView.Adapter<_ViewHolderT>()
		where _ViewHolderT: RecyclerView.ViewHolder,
				_ViewHolderT: ArrayRecyclerAdapter.ViewHolderAdapter
{
	companion object
	{
		fun createFromResource<_ViewHolderT>(context: Context,
				textArrayResId: Int, textViewResId: Int,
				factory: (root: View, text: TextView) -> _ViewHolderT)
				: ArrayRecyclerAdapter<CharSequence, _ViewHolderT>
				where _ViewHolderT: RecyclerView.ViewHolder,
						_ViewHolderT: ArrayRecyclerAdapter.ViewHolderAdapter<commit_msg>Fix compatibility with latest kotlin<commit_after>/*
 * ArrayRecyclerAdapter.kt
 *
 * Author: <NAME>
 * Copyright (c) 2015 <NAME>
 * Refer to LICENSE for details
 */

package com.nkming.utils.widget

import android.content.Context
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.nkming.utils.Log
import java.util.*

/**
 * Derived class of RecyclerView.Adapter that looks similar to the original
 * ArrayAdapter. Filter is not supported
 */
class ArrayRecyclerAdapter<_ItemT, _ViewHolderT>(
		context: Context, resource: Int, textViewResourceId: Int,
		objects: MutableList<_ItemT>,
		factory: (root: View, text: TextView) -> _ViewHolderT)
		: RecyclerView.Adapter<_ViewHolderT>()
		where _ViewHolderT: RecyclerView.ViewHolder,
				_ViewHolderT: ArrayRecyclerAdapter.ViewHolderAdapter
{
	companion object
	{
		fun <_ViewHolderT> createFromResource(context: Context,
				textArrayResId: Int, textViewResId: Int,
				factory: (root: View, text: TextView) -> _ViewHolderT)
				: ArrayRecyclerAdapter<CharSequence, _ViewHolderT>
				where _ViewHolderT: RecyclerView.ViewHolder,
						_ViewHolderT: ArrayRecyclerAdapter.ViewHolderAdapter
{'fraction_non_alphanumeric': 0.092, 'fraction_numerical': 0.004, 'mean_word_length': 5.347715736040609, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3019220', 'n_tokens_mistral': 842, 'n_tokens_neox': 746, 'n_words': 186}