Mini Commons

A slimmed down version of Apache Commons Lang.

License

License

ASL
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

mini-commons
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Mini Commons
A slimmed down version of Apache Commons Lang.
Project URL

Project URL

https://github.com/marschall/mini-commons
Source Code Management

Source Code Management

https://github.com/marschall/mini-commons

Download mini-commons

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/mini-commons/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>mini-commons</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/mini-commons/
implementation 'com.github.marschall:mini-commons:0.1.0'
// https://jarcasting.com/artifacts/com.github.marschall/mini-commons/
implementation ("com.github.marschall:mini-commons:0.1.0")
'com.github.marschall:mini-commons:jar:0.1.0'
<dependency org="com.github.marschall" name="mini-commons" rev="0.1.0">
  <artifact name="mini-commons" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='mini-commons', version='0.1.0')
)
libraryDependencies += "com.github.marschall" % "mini-commons" % "0.1.0"
[com.github.marschall/mini-commons "0.1.0"]

Dependencies

test (4)

Group / Artifact Type Version
org.apache.commons : commons-lang3 jar 3.4
junit : junit jar 4.12
org.openjdk.jmh : jmh-core jar 1.12
org.openjdk.jmh : jmh-generator-annprocess jar 1.12

Project Modules

There are no modules declared in this project.

Mini Commons Build Status Maven Central

Like Apache Commons Lang but lighter weight.

<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>mini-commons</artifactId>
    <version>0.1.0</version>
</dependency>

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.
  • More JDK compliant hashing:
    • use 31 instead of 37 as a hash code multiplier
    • use JDK hash code for booleans

Javadoc

Versions

Version
0.1.0