Tools for bld Extensions
This project provides a collection of tools used by various bld extensions.
To use, include the following in your bld build file:
repositories = List.of(RIFE2_SNAPSHOTS, RIFE2_RELEASES);
scope(compile).include(
dependency("com.uwyn.rife2", "bld-extensions-tools", version(0, 9,0,"SNAPSHOT"))
);Please check the documentation for more information.
The following static methods are provided:
| Method | Description |
|---|---|
joinClasspath(Collection<String>... files) |
Joins lists of files into a classpath. |
joinClasspath(String... paths) |
Join string paths into a classpath. |
The following static methods are provided:
| Method | Description |
|---|---|
canExecute(File file) |
Check if a file is executable. |
canExecute(Path path) |
Check if a file path is exectuable. |
canExecute(String path) |
Check if a file path is exectuable. |
exists(File file) |
Check if a file exists. |
exists(Path path) |
Check if a path exists. |
exists(String path) |
Check if a path exists. |
isDirectory(File file) |
Check if a file is a directory. |
isDirectory(Path path) |
Check if a path is a directory. |
isDirectory(String path) |
Check if a path is a directory. |
mkdirs(File file) |
Make directories. |
mkdirs(Path path) |
Make directories. |
mkdirs(String path) |
Make directories. |
notExists(File file) |
Check if a file exists. |
notExists(Path path) |
Check if a path exists. |
notExists(String path) |
Check if a path exists. |
resolveFile(File base, String... segments) |
Resolve a file with additional path segments. |
NOTE: All methods properly handle null values
The following static methods are provided:
| Method | Description |
|---|---|
isAnyNull(Collection<?> objects) |
Checks if any of the provided objects are null. |
isAnyNull(T... objects) |
Checks if any of the provided objects are null. |
isEmpty(Collection<?> collection) |
Checks if a collection is empty. |
isEmpty(Map<?,?> map) |
Checks if a map is empty. |
isEmpty(T[] array) |
Checks if an array is empty. |
isEmpty(T[]... arrays) |
Checks if any of the provided arrays are empty. |
isNotEmpty(Collection<?> collection) |
Checks if a collection is not empty. |
isNotEmpty(Map<?,?> map) |
Checks if a map is not empty. |
isNotEmpty(T[] array) |
Checks if an array is not empty. |
isNotEmpty(T[]... arrays) |
Checks if any of the provided arrays are not empty. |
isNotNull(Collection<?> objects) |
Checks if any of the provided objects are not null. |
isNotNull(T... objects) |
Checks if any of the provided objects are not null. |
isNull(Collection<?> objects) |
Checks if the provided objects are all null. |
isNull(T... objects) |
Checks if the provided objects are all null. |
NOTE: All methods properly handle null objects
The following static methods are provided:
| Method | Description |
|---|---|
isAix() |
Determines if the current operating system is AIX. |
isCygwin() |
Determines if the current operating system is Cygwin. |
isFreeBsd() |
Determines if the current operating system is FreeBSD. |
isLinux() |
Determines if the current operating system is Linux. |
isMacOS() |
Determines if the current operating system is macOS. |
isMingw() |
Determines if the current operating system is MinGW. |
isOpenVms() |
Determines if the current operating system is OpenVMS. |
isOtherOS() |
Determines if the current operating system is other than AIX, FreeBSD, Linux, macOS, OpenVMS, Solaris or Windows |
isSolaris() |
Determines if the current operating system is Solaris. |
isWindows() |
Determines if the current operating system is Windows. |
The following static methods are provided:
| Method | Description |
|---|---|
isBlank(CharSequence str) |
Checks if a string is blank. |
isBlank(CharSequence... strings) |
Checks if strings are blank. |
isBlank(Object... strings) |
Checks if string objects are blank. |
isEmpty(CharSequence str) |
Checks if a string is empty. |
isEmpty(CharSequence... strings) |
Checks if strings are empty. |
isEmpty(Object... strings) |
Checks if string objects are empty. |
isNotBlank(CharSequence str) |
Checks if a string is not blank. |
isNotBlank(CharSequence... strings) |
Checks if strings are not blank. |
isNotBlank(Objects... strings) |
Checks if string objects are not blank. |
isNotEmpty(CharSequence str) |
Checks if a string is not empty. |
isNotEmpty(CharSequence... strings) |
Checks if strings are not empty. |
isNotEmpty(Objects... objects) |
Checks if string objects are not empty. |
NOTE: All methods properly handle null strings.