Package com.acrolinx.sidebar.utils
Class Validate
- java.lang.Object
-
- com.acrolinx.sidebar.utils.Validate
-
public final class Validate extends java.lang.ObjectA utility class containing only static methods to quickly check constructor and method arguments.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidisDirectory(java.nio.file.Path directoryPath, java.lang.String variableName)static voidisRegularFile(java.nio.file.Path filePath, java.lang.String variableName)static voidnotNull(java.lang.Object object, java.lang.String variableName)
-
-
-
Method Detail
-
isDirectory
public static void isDirectory(java.nio.file.Path directoryPath, java.lang.String variableName)- Throws:
java.lang.IllegalArgumentException- ifdirectoryPathisnullornot a directory.
-
isRegularFile
public static void isRegularFile(java.nio.file.Path filePath, java.lang.String variableName)- Throws:
java.lang.IllegalArgumentException- iffilePathisnullornot a regular file.
-
notNull
public static void notNull(java.lang.Object object, java.lang.String variableName)- Throws:
java.lang.IllegalArgumentException- ifobjectisnull.
-
-