Package com.acrolinx.sidebar.utils
Class Validate
- java.lang.Object
-
- com.acrolinx.sidebar.utils.Validate
-
public final class Validate extends java.lang.Object
A 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 void
isDirectory(java.nio.file.Path directoryPath, java.lang.String variableName)
static void
isRegularFile(java.nio.file.Path filePath, java.lang.String variableName)
static void
notNull(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
- ifdirectoryPath
isnull
ornot a directory
.
-
isRegularFile
public static void isRegularFile(java.nio.file.Path filePath, java.lang.String variableName)
- Throws:
java.lang.IllegalArgumentException
- iffilePath
isnull
ornot a regular file
.
-
notNull
public static void notNull(java.lang.Object object, java.lang.String variableName)
- Throws:
java.lang.IllegalArgumentException
- ifobject
isnull
.
-
-