I reversed some Java code to get a uml class diagram using Visual Paradigm. The diagram shows some associations with little black circles on one end, which I never saw before.
Image
It's definitely not a composition and not a containment! Can anybody explain to me, what kind of association this is?
Here's the related code:
public class DataAdapter extends RecyclerView.Adapter<DataAdapter.ViewHolder> {
public static final String TAG = DataAdapter.class.getSimpleName();
private static Context mContext;
private ArrayList<DataClass> mData;
private static OnItemClickListener<DataClass> mListener;
public static class ViewHolder extends RecyclerView.ViewHolder {}
public DataAdapter(Context context, ArrayList<DataClass> data) {}
public void setOnClickListener(OnItemClickListener listener) {}
@Override
public int getItemCount() {}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {}
}
public interface OnItemClickListener<T> {
public void onItemClick(T item);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…