equal
deleted
inserted
replaced
92 } |
92 } |
93 } |
93 } |
94 |
94 |
95 public static <T extends NameIdentified> T findByName(Collection<T> collection, String name) { |
95 public static <T extends NameIdentified> T findByName(Collection<T> collection, String name) { |
96 for (T element : collection) { |
96 for (T element : collection) { |
97 if (equalz(element.getName(), name)) { |
97 if (element != null && equalz(element.getName(), name)) { |
98 return element; |
98 return element; |
99 } |
99 } |
100 } |
100 } |
101 |
101 |
102 return null; |
102 return null; |