Enumerable is a “wide” interface with a lot of methods, and I didn’t want every implementation to have to implement every method. So I created the class EnumerableDefaults to hold those default implementations. The methods are static but the first argument is always the Enumerable.

If we only supported JDK 8 and above I would have used the feature that allows default implementations of interface methods[1]. I was basing the linq4j API on LINQ[2] and lack of default methods was galling, because C# has had default methods for a long time.


[1] https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html <https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html>

[2] https://msdn.microsoft.com/en-us/library/system.linq.enumerable(v=vs.110).aspx <https://msdn.microsoft.com/en-us/library/system.linq.enumerable(v=vs.110).aspx>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB