jitertools are a (sadly) not complete implementation of python's itertools package.
using this implementation, the usage of lists and maps in java can be a bit simplified. nevertheless, the jitertools are not the holy grail so they can not solve all the problems and quirks java collections/generics have. (e.g. zip don't support distinct types :| )
to get an idea how to use jitertools, look at the unit tests
in the src/test/java/de/downgra/jitertools
package. this should
give you a good overview and starting point.
to create a .jar
, run
> mvn package
on the command line and maven 2 will then create an
target/jitertools-<version>.jar
file, which you can use in your
project. or you install this package into your local maven repository
using
> mvn install
at the moment, there are the following functions implemented:
- count
- cycle
- repeat
- filter
- filterfalse
- chain
- dropwhile
- map
- slice
- takewhile
- zip
- all
- any
- enumerate
- list
- ncycles
- no
- pad
- quantify
- range
- reduce
- tabulate
- consume
- nth
please report bugs here