forked from neo4j-contrib/neo4j-apoc-procedures
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes neo4j-contrib#4108: Remove org.apache.commons.collections* impo…
…rts (neo4j-contrib#4129) (neo4j-contrib#4219) * Fixes neo4j-contrib#4108: Remove org.apache.commons.collections* imports * removed unused methods
- Loading branch information
1 parent
73e4030
commit cc60228
Showing
12 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package apoc.util; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
public class ExtendedListUtils { | ||
|
||
/** | ||
* Returns a new list containing the second list appended to the | ||
* first list. The {@link List#addAll(Collection)} operation is | ||
* used to append the two given lists into a new list. | ||
* | ||
* @param <E> the element type | ||
* @param list1 the first list | ||
* @param list2 the second list | ||
* @return a new list containing the union of those lists | ||
* @throws NullPointerException if either list is null | ||
*/ | ||
public static <E> List<E> union(final List<? extends E> list1, final List<? extends E> list2) { | ||
final ArrayList<E> result = new ArrayList<>(list1.size() + list2.size()); | ||
result.addAll(list1); | ||
result.addAll(list2); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package apoc.util; | ||
|
||
import java.util.Map; | ||
|
||
public class ExtendedMapUtils { | ||
|
||
public static int size(final Map<?, ?> map) { | ||
return map == null ? 0 : map.size(); | ||
} | ||
|
||
public static boolean isEmpty(final Map<?,?> map) { | ||
return map == null || map.isEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters