java.lang.Object
com.aoapps.dbc.ObjectFactories
A set of object factories for various types.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ObjectFactory
<BigDecimal> static final ObjectFactory
<Boolean> static final ObjectFactory
<byte[]> static final ObjectFactory
<Date> static final ObjectFactory
<Double> static final ObjectFactory
<Float> static final ObjectFactory
<Integer> static final ObjectFactory
<Long> static final ObjectFactory
<Short> static final ObjectFactory
<String> static final ObjectFactory
<Timestamp> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ObjectFactory
<T> notNull
(ObjectFactory<T> objectFactory) Wraps an object factory, unless it is already not nullable.static <T,
Ex extends Throwable>
ObjectFactoryE<T, Ex> notNull
(ObjectFactoryE<T, Ex> objectFactory) Wraps an object factory, unless it is already not nullable.
-
Field Details
-
BigDecimal
-
Boolean
-
ByteArray
-
Date
-
Double
-
Float
-
Integer
-
Long
-
Short
-
String
-
Timestamp
-
-
Method Details
-
notNull
public static <T,Ex extends Throwable> ObjectFactoryE<T,Ex> notNull(ObjectFactoryE<T, Ex> objectFactory) Wraps an object factory, unless it is already not nullable.- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Returns:
- If not nullable, trusts the given object factory to not return
null
, otherwise wraps. Also wraps when assertions are enabled.
-
notNull
Wraps an object factory, unless it is already not nullable.- Returns:
- If not nullable, trusts the given object factory to not return
null
, otherwise wraps. Also wraps when assertions are enabled.
-
Class::new
.