Giter VIP home page Giter VIP logo

java-commons's Introduction

java-commons

Provides easy functions to perform several common operations on Java Collections. In future support to be added for file operations, advanced operations on Sets and Maps, and possibly inclusions for NLP, Sentiment Analysis etc.

This repository was build by BlobCity for its internal use within the BlobCity Data Platform. Due to a wide-scale requirement of such a utility, we decided to open source the project. We expect a bi-directional relationship, whereby the community can find use of the code we built, and we can find us of any code the community contributes to this repository.

This repository is actively maintained and we are open to your contributions. Write to us at [email protected] if you wish to become an involved contributor and reviewer.

CollectionUtil

Provides high level untilty methods to easily perform some of the common operations on Java Collections.

CollectionUtil.retainIf

Retain all elements in collection satisfy the predicate condition

CollectionUtil.retainIf(collection, a -> a > 5);

CollectionUtil.removeIf

Remove all elements in collection that satisfy the predicate condition

CollectionUtil.removeIf(collection, a -> a > 5);

JSON Utilities

Check if two JSON Objects are equal. Works on org.json.JSONObject or a JSON String

JSON.areEqual(json1, json2)

Implementation does a deep check within the JSON. Checks for nested JSON's, arrays, JSON within arrays. Function will return true only if the JSONs are exactly the same. The keys don't have to be in the same order for the two JSON's to be equal. Array elements have to be in same order for the JSON's to be equal.

java-commons's People

Contributors

sanketsarang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.