(List<E> list)
| 182 | } |
| 183 | |
| 184 | public static <E> List<E> removeDuplicateElement(List<E> list) { |
| 185 | if (list.size() < 2) { |
| 186 | return list; |
| 187 | } |
| 188 | ArrayList<E> result = new ArrayList<E>(); |
| 189 | HashSet<E> seen = new HashSet<E>(); |
| 190 | for (E element : list) { |
| 191 | if (element == null || !seen.add(element)) continue; |
| 192 | result.add(element); |
| 193 | } |
| 194 | return result; |
| 195 | } |
| 196 | |
| 197 | public static List<String> formatHeaders(String headers) { |
| 198 | String[] lines; |