MCPcopy Index your code
hub / github.com/XF-FS/APIKit / removeDuplicateElement

Method removeDuplicateElement

src/main/java/burp/utils/CommonUtils.java:184–195  ·  view source on GitHub ↗
(List<E> list)

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected