Skip to content

Commit 7c7ebcd

Browse files
committed
Add missing methods to ObjectTools table
1 parent 862cbd5 commit 7c7ebcd

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,27 @@ The following static methods are provided:
8383

8484
The following static methods are provided:
8585

86-
| Method | Description |
87-
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------|
88-
| [`isAnyNull(Collection<?> objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isAnyNull(java.util.Collection)) | Checks if any of the provided objects are `null`. |
89-
| [`isAnyNull(T... objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isAnyNull(T...)) | Checks if any of the provided objects are `null`. |
90-
| [`isEmpty(Collection<?> collection)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isEmpty(java.util.Collection)) | Checks if a collection is empty. |
91-
| [`isEmpty(Map<?,?> map)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isEmpty(java.util.Map)) | Checks if a map is empty. |
92-
| [`isEmpty(T[] array)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isEmpty(T[])) | Checks if an array is empty. |
93-
| [`isEmpty(T[]... arrays)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isEmpty(T[]...)) | Checks if any of the provided arrays are empty. |
94-
| [`isNotEmpty(Collection<?> collection)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotEmpty(java.util.Collection)) | Checks if a collection is not empty. |
95-
| [`isNotEmpty(Map<?,?> map)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotEmpty(java.util.Map)) | Checks if a map is not empty. |
96-
| [`isNotEmpty(T[] array)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotEmpty(T[])) | Checks if an array is not empty. |
97-
| [`isNotEmpty(T[]... arrays)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotEmpty(T[]...)) | Checks if any of the provided arrays are not empty. |
98-
| [`isNotNull(Collection<?> objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotNull(java.util.Collection)) | Checks if any of the provided objects are not `null`. |
99-
| [`isNotNull(T... objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNotNull(T...)) | Checks if any of the provided objects are not `null`. |
100-
| [`isNull(Collection<?> objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNull(java.util.Collection)) | Checks if the provided objects are all `null`. |
101-
| [`isNull(T... objects)`](https://rife2.github.io/bld-extensions-tools/rife/bld/extension/tools/ObjectTools.html#isNull(T...)) | Checks if the provided objects are all `null`. |
86+
| Method | Description |
87+
|:---------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
88+
| `isAnyNull(Collection<?> collection)` | Returns `true` if the collection itself is `null` or any element in it is `null`. |
89+
| `isAnyNull(T... objects)` | Returns `true` if the varargs array itself is `null` or any element is `null`. |
90+
| `isEmpty(Collection<?> collection)` | Returns `true` if the collection is `null` or contains no elements. |
91+
| `isEmpty(Map<?,?> map)` | Returns `true` if the map is `null` or contains no entries. |
92+
| `isEmpty(T[] array)` | Returns `true` if the array is `null` or has length 0. |
93+
| `isEmpty(T... collections)` | Returns `true` if the varargs array itself is `null` or if all provided collections are `null` or empty; returns `false` as soon as any collection contains at least one element. |
94+
| `isNotEmpty(Collection<?> collection)` | Returns `true` if the collection is not `null` and contains at least one element. |
95+
| `isNotEmpty(Map<?,?> map)` | Returns `true` if the map is not `null` and contains at least one entry. |
96+
| `isNotEmpty(T[] array)` | Returns `true` if the array is not `null` and has length greater than 0. |
97+
| `isNotEmpty(T... collections)` | Returns `true` if any provided collection is not `null` and not empty. |
98+
| `isNotNull(Collection<?> collection)` | Returns `true` if the collection is not `null` and all elements are non‑`null`. |
99+
| `isNotNull(T... objects)` | Returns `true` if the varargs array is not `null` and all elements are non‑`null`; vacuously `true` for an empty argument list. |
100+
| `isNull(Collection<?> collection)` | Returns `true` if the collection is `null` or all elements are `null`. |
101+
| `isNull(T... objects)` | Returns `true` if the varargs array is `null` or all elements are `null`; vacuously `true` for an empty argument list. |
102+
| `requireAnyNotEmpty(T[] array, String message)` | Throws `IllegalArgumentException` if the array is `null` or empty. |
103+
| `requireAnyNotEmpty(Map<?, ?> map, String message)` | Throws `IllegalArgumentException` if the map is `null` or empty. |
104+
| `requireAnyNotEmpty(Collection<?> collection, String message)` | Throws `IllegalArgumentException` if the collection is `null` or empty. |
105+
| `requireAnyNotEmpty(String message, T... collections)` | Throws `IllegalArgumentException` if all provided collections are `null` or empty. |
106+
102107

103108
*NOTE:* All methods properly handle `null` objects
104109

0 commit comments

Comments
 (0)