Skip to content

ph base

Philip Helger edited this page Apr 8, 2026 · 1 revision

The most fundamental module in the ph-commons project. Provides core utilities used by virtually all other modules.

Highlights:

  • ValueEnforcer - parameter validation (notNull, notEmpty, isGT0, etc.)
  • CGlobal - system-wide constants (sizes, time units, radixes)
  • SimpleReadWriteLock / AutoLock - concurrency primitives for try-with-resources locking
  • StringHelper / StringParser - string manipulation and parsing
  • ToStringGenerator - fluent toString() builder
  • HashCodeGenerator / EqualsHelper / CompareHelper - object identity and ordering
  • ArrayHelper - array manipulation utilities
  • GenericReflection - reflection helper (class loading, instantiation)
  • Base64 and codec classes - encoding/decoding (Base16, Base32, Base64, Hex, GZIP, etc.)
  • IBuilder / IResettableBuilder - builder pattern interfaces
  • CallbackList / IExceptionCallback - callback infrastructure
  • EmailAddress - email validation and representation
  • EJavaVersion - Java version detection

Maven usage

Add the following to your pom.xml to use this artifact:

<dependency>
  <groupId>com.helger.commons</groupId>
  <artifactId>ph-base</artifactId>
  <version>x.y.z</version>
</dependency>

Clone this wiki locally