File tree Expand file tree Collapse file tree 14 files changed +56
-39
lines changed
main/java/com/github/underscore/lodash
test/java/com/github/underscore/lodash
main/java/com/github/underscore/math
test/java/com/github/underscore/math
src/test/java/com/github/underscore
main/java/com/github/underscore/string
test/java/com/github/underscore/string Expand file tree Collapse file tree 14 files changed +56
-39
lines changed Original file line number Diff line number Diff line change 55 <groupId >com.github.javadev</groupId >
66 <artifactId >underscore-lodash</artifactId >
77 <packaging >jar</packaging >
8- <version >1.0 </version >
8+ <version >1.1 </version >
99 <name >Lodash plugin for underscore-java</name >
1010 <description >The lodash plugin for underscore-java</description >
1111 <url >https://github.com/javadev/underscore-java</url >
115115 <dependency >
116116 <groupId >com.github.javadev</groupId >
117117 <artifactId >underscore</artifactId >
118- <version >1.4 </version >
118+ <version >1.5 </version >
119119 </dependency >
120120 <dependency >
121121 <groupId >junit</groupId >
Original file line number Diff line number Diff line change 202202 <dependency >
203203 <groupId >com.github.javadev</groupId >
204204 <artifactId >underscore</artifactId >
205- <version >1.4 </version >
205+ <version >1.5-SNAPSHOT </version >
206206 </dependency >
207207 <dependency >
208208 <groupId >junit</groupId >
Original file line number Diff line number Diff line change @@ -298,6 +298,10 @@ public static <T> Chain chain(final T ... list) {
298298 return new $ .Chain <T >(Arrays .asList (list ));
299299 }
300300
301+ public Chain chain () {
302+ return new $ .Chain <T >(newArrayList (value ()));
303+ }
304+
301305 public static <T > List <List <T >> chunk (final Iterable <T > iterable , final Integer size ) {
302306 int index = 0 ;
303307 int length = size (iterable );
Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ public void main() {
415415 $ .main (new String [] {});
416416 new $ (new ArrayList <String >());
417417 new $ ("" );
418+ new $ (asList ()).chain ();
418419 $ .chain (new ArrayList <String >());
419420 $ .chain (new HashSet <String >());
420421 $ .chain (new String [] {});
Original file line number Diff line number Diff line change 55 <groupId >com.github.javadev</groupId >
66 <artifactId >underscore-math</artifactId >
77 <packaging >jar</packaging >
8- <version >1.0 </version >
8+ <version >1.1 </version >
99 <name >Math plugin for underscore-java</name >
1010 <description >The math plugin for underscore-java</description >
1111 <url >https://github.com/javadev/underscore-java</url >
7676 <id >attach-sources</id >
7777 <goals >
7878 <goal >jar</goal >
79+ <goal >test-jar</goal >
7980 </goals >
8081 </execution >
8182 </executions >
8990 <id >attach-sources</id >
9091 <goals >
9192 <goal >jar</goal >
93+ <goal >test-jar</goal >
9294 </goals >
9395 </execution >
9496 </executions >
113115 <dependency >
114116 <groupId >com.github.javadev</groupId >
115117 <artifactId >underscore</artifactId >
116- <version >1.3 </version >
118+ <version >1.5 </version >
117119 </dependency >
118120 <dependency >
119121 <groupId >junit</groupId >
Original file line number Diff line number Diff line change 55 <groupId >com.github.javadev</groupId >
66 <artifactId >underscore-math</artifactId >
77 <packaging >jar</packaging >
8- <version >1.0 -SNAPSHOT</version >
8+ <version >1.1 -SNAPSHOT</version >
99 <name >Math plugin for underscore-java</name >
1010 <description >The math plugin for underscore-java</description >
1111 <url >https://github.com/javadev/underscore-java</url >
202202 <dependency >
203203 <groupId >com.github.javadev</groupId >
204204 <artifactId >underscore</artifactId >
205- <version >1.3 </version >
205+ <version >1.5-SNAPSHOT </version >
206206 </dependency >
207207 <dependency >
208208 <groupId >junit</groupId >
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ public static <T> Chain chain(final T[] list) {
6767 return new $ .Chain <T >(Arrays .asList (list ));
6868 }
6969
70+ public Chain chain () {
71+ return new $ .Chain <T >(newArrayList (value ()));
72+ }
73+
7074 public static <T extends Number > T sum (final Iterable <T > iterable ) {
7175 T result = null ;
7276 for (final T item : iterable ) {
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ public void median() {
148148 public void main () throws Exception {
149149 $ .main (new String [] {});
150150 new $ ("" );
151+ new $ (asList ()).chain ();
151152 $ .chain (new HashSet <String >());
152153 $ .chain (new String [] {});
153154 }
Original file line number Diff line number Diff line change 55 <groupId >com.github.javadev</groupId >
66 <artifactId >underscore</artifactId >
77 <packaging >jar</packaging >
8- <version >1.4 </version >
8+ <version >1.5 </version >
99 <name >java port of Underscore.js</name >
1010 <description >The java port of Underscore.js</description >
1111 <url >https://github.com/javadev/underscore-java</url >
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ public void defer() throws Exception {
129129 }
130130 counter [0 ]++; return null ; } });
131131 assertEquals ("incr was debounced" , 0 , counter [0 ]);
132- Thread .sleep (32 );
132+ Thread .sleep (60 );
133133 assertEquals ("incr was debounced" , 1 , counter [0 ]);
134134 }
135135
You can’t perform that action at this time.
0 commit comments