Reputation: 4719
In the application, I have huge data set in various collection container such as List, Map, Set, etc. For example:-
static List<Employee> employeeList = Arrays.asList(
new Employee("Tom Jones", 45),
new Employee("Harry Major", 25),
new Employee("Ethan Hardy", 65),
new Employee("Nancy Smith", 22),
new Employee("Deborah Sprightly", 29),
new Employee("Billy Kid", 22),
new Employee("George King", 44),
new Employee("Annie Barrey", 19));
Here are only a few items in the list hardcoded. But if I have more than 10 thousands of item in the list. How can I verify an Employee named "George King" is exist in this list? I know how to do it by code. But will it be possible to quickly verify this in the Intellij debugger? My assumption there should be some way. Please let me know how can do it without stepping and iterate all the values one by one.
Upvotes: 1
Views: 289
Reputation: 79
you can try setting a breakpoint in this line
static List<Employee> employeeList = Arrays.asList(
and check the content in the list in the debugger window like in the image below.
Thanks, I hope this answers your question.
Upvotes: -1
Reputation: 73558
One way would be to set a conditional breakpoint, with the condition being contains(...)
sort of thing.
Upvotes: 2