projects
/
jpim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Implement Data utility to encapsulate resource management
[jpim.git]
/
src
/
de
/
j32
/
util
/
Util.java
diff --git
a/src/de/j32/util/Util.java
b/src/de/j32/util/Util.java
index
bbf5295
..
cd4efb8
100644
(file)
--- a/
src/de/j32/util/Util.java
+++ b/
src/de/j32/util/Util.java
@@
-40,4
+40,11
@@
public class Util
if (it.hasNext()) return it.next();
return null;
}
+
+ public static <E> E first(Iterator<E> it)
+ {
+ if (it.hasNext()) return it.next();
+ return null;
+ }
+
}