The rubycollect4j implements all methods refer to Ruby Array, Hash and Enumerable.

For further info, please visit http://ruby-doc.org website.

For more documentation, please read JavaDoc.

With Java 8:
// Sort the characters by its frequency based on the word 'Mississippi' case-insensitively
RubyArray<String> word = ra("Mississippi".split("(?!^)"));

String result = word.map((c) -> {
return c.toLowerCase();
}).sortBy((c) -> {
return word.count(c);
}).uniq().join();

p(result); // "mpis"

With Java 6:
// Sort the characters by its frequency based on the word 'Mississippi' case-insensitively
final RubyArray<String> word = newRubyArray("Mississippi".split("(?!^)"));

String result = word.map(new TransformBlock<String, String>() {
public String yield(String c) {
return c.toLowerCase();
}
}).sortBy(new TransformBlock<String, Integer>() {
public Integer yield(String c) {
return word.count(c);
}
}).uniq().join();

p(result); // "mpis"

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow rubycollect4j

rubycollect4j Web Site

Other Useful Business Software
Secure User Management, Made Simple | Frontegg Icon
Secure User Management, Made Simple | Frontegg

Get 7,500 MAUs, 50 tenants, and 5 SSOs free – integrated into your app with just a few lines of code.

Frontegg powers modern businesses with a user management platform that’s fast to deploy and built to scale. Embed SSO, multi-tenancy, and a customer-facing admin portal using robust SDKs and APIs – no complex setup required. Designed for the Product-Led Growth era, it simplifies setup, secures your users, and frees your team to innovate. From startups to enterprises, Frontegg delivers enterprise-grade tools at zero cost to start. Kick off today.
Start for Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of rubycollect4j!

Additional Project Details

Intended Audience

Developers

Programming Language

Java

Related Categories

Java Libraries

Registered

2013-06-18