The WizTools.org Commons Library (part of WizTools.org project) is a rich collection of commonly used convenience classes and data-structures for Java.
This is developed and maintained by Subhash Chandran.
Gradle:
compile 'org.wiztools:commons-lib:0.4.2'
Maven:
<dependency>
<groupId>org.wiztools</groupId>
<artifactId>commons-lib</artifactId>
<version>0.4.2</version>
</dependency>
This library does not depend on any external libraries.
Note: The examples are for bringing to your attention the features of this library. It is a small sample of the rich content in this library.
All classes are from the package:
import org.wiztools.commons.*;
File f = ...;
FileUtil.getContentAsString(f, Charsets.UTF_8);
String splitStr = ...;
String input = ...;
List<String> arr = StringUtil.explode(splitStr, input);
String encoded = XmlEntityEncode.encode(input);
String input = ...;
String hash = DigestUtil.md5hex(input.getBytes("UTF-8"));
MultiValueMap<String, String> m = new MultiValueMapArrayList<String, String>();
m.put("key1", "value1");
m.put("key1", "value2");
// Returns "value1" and "value2":
Collection<String, String> values = m.get("key1");
MultiValueMap.java MultiValueMapArrayList.java
// The relationship between MyInterface and MyInterfaceImplClass
// needs to be defined in the properties file
// wiztools-service-locator.properties and should be available in
// the classpath. The association is defined thus:
// com.package.MyInterface = com.package.MyInterfaceImplClass
MyInterface obj = Implementation.of(MyInterface.class);