// Path: app/src/main/java/se/oort/diplicity/apigen/SingleContainer.java
// public class SingleContainer<T> implements java.io.Serializable {
//   public SingleContainer() {
//   }
//   public T Properties;
//   public java.util.List<Link> Links;
//   public String name;
//   public java.util.List<java.util.List<String>> Desc;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/UserStats.java
// public class UserStats implements java.io.Serializable {
//   public String UserId;
//   public Long JoinedGames;
//   public Long StartedGames;
//   public Long FinishedGames;
//   public Long SoloGames;
//   public Long DIASGames;
//   public Long EliminatedGames;
//   public Long DroppedGames;
//   public Long NMRPhases;
//   public Long ActivePhases;
//   public Long ReadyPhases;
//   public Double Reliability;
//   public Double Quickness;
//   public Long OwnedBans;
//   public Long SharedBans;
//   public Double Hated;
//   public Double Hater;
//   public UserStatsNumbers PrivateStats;
//   public Glicko Glicko;
//   public TrueSkill TrueSkill;
//   public User User;
// }


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import se.oort.diplicity.apigen.SingleContainer;
import se.oort.diplicity.apigen.UserStats;
package se.oort.diplicity;




public class UserStatsAdapter extends RecycleAdapter<SingleContainer<UserStats>, UserStatsAdapter.ViewHolder> {
    private RetrofitActivity retrofitActivity;
    private StatsEmitter emitter = null;
    public class ViewHolder extends RecycleAdapter<SingleContainer<UserStats>, UserStatsAdapter.ViewHolder>.ViewHolder {
        UserView userView;
        TextView sortLabel;
        View row;

        View.OnClickListener delegateClickListener;
        public ViewHolder(View view) {
            super(view);
            row = view;
            userView = (UserView) view.findViewById(R.id.user);
            sortLabel = (TextView) view.findViewById(R.id.sort_label);
        }
        @Override
        public void bind(SingleContainer<UserStats> user, int pos) {
            userView.setUser(retrofitActivity, user.Properties.User, true);
            if (emitter != null) {
                sortLabel.setText(emitter.emit(user.Properties));
            }
            row.setOnClickListener(userView.getAvatarClickListener(retrofitActivity, user.Properties.User));
        }
    }
    public interface StatsEmitter {
        public String emit(UserStats stats);
    }
// Path: app/src/main/java/se/oort/diplicity/apigen/SingleContainer.java
// public class SingleContainer<T> implements java.io.Serializable {
//   public SingleContainer() {
//   }
//   public T Properties;
//   public java.util.List<Link> Links;
//   public String name;
//   public java.util.List<java.util.List<String>> Desc;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/UserStats.java
// public class UserStats implements java.io.Serializable {
//   public String UserId;
//   public Long JoinedGames;
//   public Long StartedGames;
//   public Long FinishedGames;
//   public Long SoloGames;
//   public Long DIASGames;
//   public Long EliminatedGames;
//   public Long DroppedGames;
//   public Long NMRPhases;
//   public Long ActivePhases;
//   public Long ReadyPhases;
//   public Double Reliability;
//   public Double Quickness;
//   public Long OwnedBans;
//   public Long SharedBans;
//   public Double Hated;
//   public Double Hater;
//   public UserStatsNumbers PrivateStats;
//   public Glicko Glicko;
//   public TrueSkill TrueSkill;
//   public User User;
// }


// Path: app/src/main/java/se/oort/diplicity/UserStatsAdapter.java
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import se.oort.diplicity.apigen.SingleContainer;
import se.oort.diplicity.apigen.UserStats;

package se.oort.diplicity;




public class UserStatsAdapter extends RecycleAdapter<SingleContainer<UserStats>, UserStatsAdapter.ViewHolder> {
    private RetrofitActivity retrofitActivity;
    private StatsEmitter emitter = null;
    public class ViewHolder extends RecycleAdapter<SingleContainer<UserStats>, UserStatsAdapter.ViewHolder>.ViewHolder {
        UserView userView;
        TextView sortLabel;
        View row;

        View.OnClickListener delegateClickListener;
        public ViewHolder(View view) {
            super(view);
            row = view;
            userView = (UserView) view.findViewById(R.id.user);
            sortLabel = (TextView) view.findViewById(R.id.sort_label);
        }
        @Override
        public void bind(SingleContainer<UserStats> user, int pos) {
            userView.setUser(retrofitActivity, user.Properties.User, true);
            if (emitter != null) {
                sortLabel.setText(emitter.emit(user.Properties));
            }
            row.setOnClickListener(userView.getAvatarClickListener(retrofitActivity, user.Properties.User));
        }
    }
    public interface StatsEmitter {
        public String emit(UserStats stats);
    }
    public UserStatsAdapter(RetrofitActivity retrofitActivity, List<SingleContainer<UserStats>> users) {