GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - akarnokd/ixjava: Iterable Extensions for Java 6+

BranchesTags
Open more actions menu

Latest commit

 

History

108 Commits
108 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
gradle
gradle
 
 
src
src
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
HEADER
HEADER
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
checkstyle.xml
checkstyle.xml
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
pmd.xml
pmd.xml
 
 
push.sh
push.sh
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

ixjava

codecov.io Maven Central

Iterable Extensions for Java, the dual of RxJava. Originally implemented in the Reactive4Java framework, now standalone; no dependencies on any reactive library.

The aim is to provide, lazily evaluated, pull-based datastream support with the same naming as in RxJava mainly for the pre-Java-8 world. The Stream API in Java 8 is not exactly the same thing because Streams can be only consumed once while Iterables can be consumed many times. Google Guava features a lot of Iterable operators, plus now they have the FluentIterable with similar setup but far less operators available.

This branch starts from scratch by reimplementing ix.Ix and all of its operators based on the +5 year experience with reactive and interactive dataflows.

Releases

Javadoc: https://akarnokd.github.io/ixjava/javadoc/index.html

gradle

dependencies {
    implementation 'com.github.akarnokd:ixjava:1.0.0'
}

Maven search:

http://search.maven.org

Examples

The main (and only) entry point is the class ix.Ix which features a bunch of static factory methods:

List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);

Ix<Integer> seq = Ix.from(list);

Now we can apply instance methods on the seq sequence, just like in RxJava. Not all operators are available though due to the synchronous-pull nature of IxJava.

seq
.map(v -> v + 1)
.filter(v -> v % 2 == 0)
.flatMap(v -> Ix.fromArray(v * 10, v * 100)))
.subscribe(System.out::println)
;

Since Ix implements Iterable, you can use the for-each loop to consume it:

for (Integer v : Ix.fromArray(5, 10).skip(1).concatWith(Ix.just(20))) {
    System.out.println("Value: " + v);
}

For further details on the possibilities, please study the javadoc of Ix.

About

Iterable Extensions for Java 6+

Topics

iterableiterable-extensionsjavarxjavastream

Resources

Readme
Apache-2.0 license
Activity

Stars

213 stars

Watchers

10 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.