Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.22 KB

README.md

File metadata and controls

63 lines (43 loc) · 1.22 KB

Xanadu Build Status

Java8 utilities powered by Lombok

Example

without Xanadu

public class EmployeeFinderService {

    public List<Employee> findAllEmployees() {
        final List<Company> companies = ...
        return companies.stream()
            .map(Company::getEmployees)
            .flatMap(Collection::stream)
            .collect(Collectors.toList());
    }

    ...

}

with Xanadu

@ExtensionMethod(ListOps.class)
public class EmployeeFinderService {

    public List<Employee> findAllEmployees() {
        final List<Company> companies = ...
        return companies.flatMap(Company::getEmployees);
    }

    ...

}

Install

  1. Setup Lombok. see http://projectlombok.org/mavenrepo/index.html
  2. Add Sonatype snapshot repository and add dependencies.

Using gradle

repositories {
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}

dependencies {
    compile 'jp.t2v:xanadu:0.1.0-SNAPSHOT'
}

License

This library is released under the Apache Software License, version 2, which should be included with the source in a file named LICENSE.