Get the names of all items in this list, by calling getName() on each item in the list. @return The names of all items in this list, by calling getName() on each item in the list.
()
| 90 | * @return The names of all items in this list, by calling {@code getName()} on each item in the list. |
| 91 | */ |
| 92 | public List<String> getNames() { |
| 93 | if (this.isEmpty()) { |
| 94 | return Collections.emptyList(); |
| 95 | } else { |
| 96 | final List<String> names = new ArrayList<>(this.size()); |
| 97 | for (final T i : this) { |
| 98 | if (i != null) { |
| 99 | names.add(i.getName()); |
| 100 | } |
| 101 | } |
| 102 | return names; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Get the String representations of all items in this list, by calling {@code toString()} on each item in the |