https://github.com/danwallach/java8lazylist
implementation of concurrent lazy lists in Java8 plus some code to do concurrent iteration over a lazy tree
https://github.com/danwallach/java8lazylist
Last synced: about 1 year ago
JSON representation
implementation of concurrent lazy lists in Java8 plus some code to do concurrent iteration over a lazy tree
- Host: GitHub
- URL: https://github.com/danwallach/java8lazylist
- Owner: danwallach
- Created: 2015-01-19T22:21:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-19T22:32:30.000Z (over 11 years ago)
- Last Synced: 2024-04-18T14:12:49.616Z (about 2 years ago)
- Language: Java
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
Simple Java8 example code that demonstrates the use of a lazy list to interate
over a functional tree.
FTree.java -- a simple, parametric functional tree
-- In here, you'll also see example code that builds an "eager" stream
as well as using a Stack to maintain state while iterating over a
tree. These are included for performance comparison purposes, and
aren't something you should ever seriously use. On the other hand,
the visitor pattern (i.e., the inorder() method) runs faster than
any stream variant.
EmptyFTree.java -- an "empty" leaf node that we use instead of null
ITree.java -- the interface that a tree node has to implement
LazyList.java -- functional lazy lists, including support for parallel streams
Main.java -- test code that can drive all of the above and show you performance comparisons