JavaUtil

JavaUtil is a utility library to speed the development of Java software. We developed it over multiple years during our internal development efforts, and it has reached a point of stability where we have decided to make it available to the outside world. The JavaUtil package aims to fill in the gaps of the Apache Commons and similar utility libraries out there. Features include convenience classes for string, collections, arrays, dates, iterators, colors, logging, unit testing, a little bit of basic statistics, database queries, caching and more.

License

License

Categories

Categories

CLI User Interface Eureka Container Microservices
GroupId

GroupId

org.eurekaclinical
ArtifactId

ArtifactId

javautil
Last Version

Last Version

4.5
Release Date

Release Date

Type

Type

jar
Description

Description

JavaUtil
JavaUtil is a utility library to speed the development of Java software. We developed it over multiple years during our internal development efforts, and it has reached a point of stability where we have decided to make it available to the outside world. The JavaUtil package aims to fill in the gaps of the Apache Commons and similar utility libraries out there. Features include convenience classes for string, collections, arrays, dates, iterators, colors, logging, unit testing, a little bit of basic statistics, database queries, caching and more.
Project URL

Project URL

https://github.com/eurekaclinical/javautil.git
Project Organization

Project Organization

Emory University
Source Code Management

Source Code Management

https://github.com/eurekaclinical/javautil.git

Download javautil

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.apache.commons : commons-dbcp2 jar 2.7.0
com.sun.xml.bind : jaxb-core jar 2.3.0.1
javax.xml.bind : jaxb-api jar 2.3.1
com.sun.xml.bind : jaxb-impl jar 2.3.1

test (3)

Group / Artifact Type Version
com.h2database : h2 jar 1.4.193
com.mockrunner : mockrunner-jdbc jar 2.0.1
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Javautil

Georgia Clinical and Translational Science Alliance (Georgia CTSA), Emory University, Atlanta, GA

What does it do?

It is a utility library to accelerate the development of Java software. It is used throughout Eureka! Clinical projects, but it is designed to be useful to other projects as well. While we use the Apache Commons libraries when possible, when we find a gap in those libraries, we fill the gap by adding to this project.

Packages and functionality:

  • arrays: utilities to simplify working with arrays and converting between arrays and collections.
  • collections: utilities to simplify working with collections and iterators.
  • color: utilities to simplify working with colors, like extracting a hex code from a Java Color object.
  • datetime: utilities to simplify working with Java's old datetime classes, like converting between Date and the SQL Date and Time.
  • io: utilities to simplify common IO tasks, like retryable IO and temp directory creation, and proper resource cleanup.
  • junit: utilities to simplify the creation of unit tests.
  • log: tools for some common logging tasks, like including a timestamp in log messages, and logging elapsed time.
  • map: an additional map implementation, and utilities for managing maps in which the values are collections.
  • password: password generation.
  • serviceloader: implementations of the ServiceLoader method of providing implementations of interfaces. This is now partially superceded by the JDK's own public ServiceLoader implementation.
  • sql: convenience classes for creating database connections and managing resources properly when executing database queries.
  • stat: a handful of statistical calculation classes.
  • string: supports reading and writing the rows and columns of delimited files.
  • swing: the SwingWorker class that was originally created by Sun Microsystems as an example.
  • test: supports externalizing a list of strings for comparing collections during unit testing.
  • version: classes for managing semantic versioning and comparing version numbers.

Latest release: Latest release

Version 4.2

  • Add a version of escapeAndWriteDelimitedColumn that allows forcing quotes and supports replacement.

Version 4.1

  • Add a version of escapeAndWriteDelimitedColumn that allows forcing all columns to be surrounded by double quotes.

Version 4.0.1

  • Avoid NullPointerExceptions when writing null values to a delimited file.

Version 4.0

  • Added a factory to the collections package for creating hashmaps with an expected capacity (number of key-value pairs).
  • Removed support in the pom.xml for generating a tarball/zipfile.
  • Updated h2 dependency.
  • Depend on the eurekaclinical-parent-standard-deps parent pom.

Version 3.0

  • Changed the pom to depend on Eureka! Clinical's parent pom, and changed the group id to org.eurekaclinical.
  • Added API to get and work with database product names and versions, and JDBC driver versions.
  • Moved the datastore package to its own project.

Version 2.3

More functionality.

Version 1.1

Initial release, with some additional functionality and performance improvement.

Build requirements

Runtime requirements

Building it

The project uses the maven build tool. Typically, you build it by invoking mvn clean install at the command line. For simple file changes, not additions or deletions, you can usually use mvn install. See https://github.com/eurekaclinical/dev-wiki/wiki/Building-Eureka!-Clinical-projects for more details.

Maven dependency

<dependency>
    <groupId>org.eurekaclinical</groupId>
    <artifactId>javautil</artifactId>
    <version>version</version>
</dependency>

Developer documentation

Getting help

Feel free to contact us at [email protected].

org.eurekaclinical

Eureka! Clinical

Microservices for clinical and translational research

Versions

Version
4.5
4.4
4.2
4.2-Beta-1
4.1
4.0.1
4.0
4.0-Alpha-4
4.0-Alpha-3
4.0-Alpha-2
4.0-Alpha-1
3.0
3.0-Alpha-8
3.0-Alpha-7
3.0-Alpha-6
3.0-Alpha-5
3.0-Alpha-4