Skip to content

Commit

Permalink
collection util
Browse files Browse the repository at this point in the history
  • Loading branch information
witek committed Mar 31, 2015
1 parent e21f8d2 commit f0561de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/ilarkesto/core/base/Utl.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public static void removeDuplicates(Collection collection) {
}

public static <T> T getFirstElement(Collection<T> collection) {
if (collection == null) return null;
if (collection.isEmpty()) return null;
return collection.iterator().next();
}
Expand Down

0 comments on commit f0561de

Please sign in to comment.