Class lang3.ObjectUtils

The class org.apache.commons.lang3.ObjectUtils of the Apache Commons library complements the methods of the class java.util.Objects described previously. The scope of this book and the allocated size does not allow for a detailed review of all the methods of the class ObjectUtils, so we will describe them briefly, grouped by related functionality, and will demonstrate only those that are aligned with the examples we have provided already.

All the methods of the class ObjectUtils can be organized into seven groups:

  • Object cloning methods:
    • T clone(T obj): returns a copy of the provided object if it implements the interface Cloneable; otherwise, returns null.
    • T cloneIfPossible(T obj): returns a copy of the provided ...

Get Introduction to Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.