public final class ObjectUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[][] |
clone(byte[][] array) |
static DataBuffer |
clone(DataBuffer dataBuffer) |
static DataBufferByte |
clone(DataBufferByte dataBuffer) |
static DataBufferDouble |
clone(DataBufferDouble dataBuffer) |
static DataBufferFloat |
clone(DataBufferFloat dataBuffer) |
static DataBufferInt |
clone(DataBufferInt dataBuffer) |
static DataBufferShort |
clone(DataBufferShort dataBuffer) |
static DataBufferUShort |
clone(DataBufferUShort dataBuffer) |
static double[][] |
clone(double[][] array) |
static float[][] |
clone(float[][] array) |
static int[][] |
clone(int[][] array) |
static short[][] |
clone(short[][] array) |
static <T> T |
coalesce(T firstValue,
Supplier<T>... subsequentValueSuppliers)
Analog of the SQL COALESCE function: returns the first non-null value.
|
static <T> T |
copyObject(T object)
Make a deep copy of an object.
|
public static <T> T copyObject(T object)
Point as immutable, even though technically it is
not!
T - The type of the object.object - The object to copy.OutOfMemoryError - If there is not enough memory to copy the
object.public static DataBuffer clone(DataBuffer dataBuffer)
public static DataBufferByte clone(DataBufferByte dataBuffer)
public static DataBufferDouble clone(DataBufferDouble dataBuffer)
public static DataBufferFloat clone(DataBufferFloat dataBuffer)
public static DataBufferInt clone(DataBufferInt dataBuffer)
public static DataBufferShort clone(DataBufferShort dataBuffer)
public static DataBufferUShort clone(DataBufferUShort dataBuffer)
public static byte[][] clone(byte[][] array)
public static double[][] clone(double[][] array)
public static float[][] clone(float[][] array)
public static int[][] clone(int[][] array)
public static short[][] clone(short[][] array)
@SafeVarargs public static <T> T coalesce(T firstValue, Supplier<T>... subsequentValueSuppliers)
Suppliers, so that the value need not actually be created if it is not
needed.T - The type of the value.firstValue - The first value.subsequentValueSuppliers - One or more suppliers of subsequent values. If firstValue is null then at
least one of these MUST return a non null value, or a
NullPointerException will be thrown.null value.NullPointerException - If firstValue is null and all subsequentValueSuppliers
return null.Copyright © 2011–2025 pepsoft.org. All rights reserved.