@@ -11,6 +11,10 @@ public class ObjectUtils {
1111
1212 /**
1313 * If the source param is null, return the default value.
14+ * @param source maybe null object
15+ * @param defaultValue thing to use if source is null
16+ * @param <T> list type
17+ * @return resulting object
1418 */
1519 public static <T > List <T > defaultIfNull (List <T > source , Supplier <List <T >> defaultValue ) {
1620 if (source == null ) {
@@ -21,6 +25,11 @@ public static <T> List<T> defaultIfNull(List<T> source, Supplier<List<T>> defaul
2125
2226 /**
2327 * If the source param is null, return the default value.
28+ * @param source maybe null object
29+ * @param defaultValue thing to use if source is null
30+ * @param <K> map key type
31+ * @param <V> map value type
32+ * @return resulting map
2433 */
2534 public static <K , V > Map <K , V > defaultIfNull (Map <K , V > source , Supplier <Map <K , V >> defaultValue ) {
2635 if (source == null ) {
@@ -31,6 +40,10 @@ public static <K, V> Map<K, V> defaultIfNull(Map<K, V> source, Supplier<Map<K, V
3140
3241 /**
3342 * If the source param is null, return the default value.
43+ * @param source maybe null object
44+ * @param defaultValue thing to use if source is null
45+ * @param <T> type
46+ * @return resulting object
3447 */
3548 public static <T > T defaultIfNull (T source , Supplier <T > defaultValue ) {
3649 if (source == null ) {
@@ -41,6 +54,9 @@ public static <T> T defaultIfNull(T source, Supplier<T> defaultValue) {
4154
4255 /**
4356 * Concatenate a bunch of lists.
57+ * @param sources bunch of lists.
58+ * @param <T> list type
59+ * @return resulting object
4460 */
4561 @ SafeVarargs
4662 public static <T > List <T > merge (List <T >... sources ) {
0 commit comments