https://github.com/marschall/mini-commons
like Apache Commons Lang but lighter weight
https://github.com/marschall/mini-commons
Last synced: 3 months ago
JSON representation
like Apache Commons Lang but lighter weight
- Host: GitHub
- URL: https://github.com/marschall/mini-commons
- Owner: marschall
- Created: 2016-04-29T15:25:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-02T19:42:08.000Z (over 7 years ago)
- Last Synced: 2025-01-16T02:44:57.670Z (5 months ago)
- Language: Java
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Mini Commons [](https://travis-ci.org/marschall/mini-commons) [](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/mini-commons)
============Like [Apache Commons Lang](https://commons.apache.org/proper/commons-lang/) but lighter weight.
```xml
com.github.marschall
mini-commons
0.1.0```
Changes to Apache Commons Lang:
* Removed reflective `equals` and `hashCode`. You generally use `equals` and `hashCode` for hash based collections, reflection has no place there.
* Removed initialOddNumber and multiplierOddNumber from HashCodeBuilder. We have never seen anybody use anything else than the default.
* `EqualsBuilder#append(Object, Object)` and `HashCodeBuilder#append(Object)` are simpler due to removed support for arrays.
* If you want array support use `EqualsBuilder#appendDeep(Object, Object)` or `HashCodeBuilder#appendDeep(Object)`. Is this the same pattern that `java.util.Objects` and `java.util.Arrays` use.
* Delegate to `java.util.Objects`, `java.util.Arrays`, `java.lang.Long`, `java.lang.Double` where possible.
* This may benefit from [future optimizations](http://openjdk.java.net/jeps/8044082).
* More JDK compliant hashing:
* use 31 instead of 37 as a hash code multiplier
* use JDK hash code for booleans[Javadoc](http://www.javadoc.io/doc/com.github.marschall/mini-commons/)