I have List<Custom> where Custom is
class Custom {
public int id;
public String name;
}
How to get number how many items have different names ? Is there any easier way than put all in set and get set size ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Put names to set:
You can also fill set with your
Customobjects if you use appropriate Comparator that compares names only: