Package com.helger.commons.io.file
Class FileIOError
- java.lang.Object
-
- com.helger.commons.io.file.FileIOError
-
- All Implemented Interfaces:
ISuccessIndicator
@Immutable public class FileIOError extends Object implements ISuccessIndicator
Represents an error with an additional error object.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description FileIOError(EFileIOOperation eOperation, EFileIOErrorCode eCode)FileIOError(EFileIOOperation eOperation, EFileIOErrorCode eCode, File aFile1)FileIOError(EFileIOOperation eOperation, EFileIOErrorCode eCode, File aFile1, File aFile2)FileIOError(EFileIOOperation eOperation, EFileIOErrorCode eCode, File aFile1, File aFile2, Exception aException)FileIOError(EFileIOOperation eOperation, EFileIOErrorCode eCode, Exception aException)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)EFileIOErrorCodegetErrorCode()ExceptiongetException()FilegetFile1()FilegetFile2()EFileIOOperationgetOperation()booleanhasException()booleanhasFile1()booleanhasFile2()inthashCode()booleanisSuccess()StringtoString()FileIOErrorwithoutErrorCode()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.state.ISuccessIndicator
and, isFailure, or
-
-
-
-
Constructor Detail
-
FileIOError
public FileIOError(@Nonnull EFileIOOperation eOperation, @Nonnull EFileIOErrorCode eCode)
-
FileIOError
public FileIOError(@Nonnull EFileIOOperation eOperation, @Nonnull EFileIOErrorCode eCode, @Nonnull File aFile1)
-
FileIOError
public FileIOError(@Nonnull EFileIOOperation eOperation, @Nonnull EFileIOErrorCode eCode, @Nonnull File aFile1, @Nonnull File aFile2)
-
FileIOError
public FileIOError(@Nonnull EFileIOOperation eOperation, @Nonnull EFileIOErrorCode eCode, @Nonnull Exception aException)
-
FileIOError
public FileIOError(@Nonnull EFileIOOperation eOperation, @Nonnull EFileIOErrorCode eCode, @Nullable File aFile1, @Nullable File aFile2, @Nullable Exception aException)
-
-
Method Detail
-
getOperation
@Nonnull public EFileIOOperation getOperation()
- Returns:
- The operation passed in the constructor. Never
null.
-
getErrorCode
@Nonnull public EFileIOErrorCode getErrorCode()
- Returns:
- The error code passed in the constructor. Never
null.
-
isSuccess
public boolean isSuccess()
- Specified by:
isSuccessin interfaceISuccessIndicator- Returns:
trueon success andfalseon failure.
-
getFile1
@Nullable public File getFile1()
- Returns:
- The first file relevant to this error. May be
null.
-
hasFile1
public boolean hasFile1()
- Returns:
trueif the first file is present,falseif not.
-
getFile2
@Nullable public File getFile2()
- Returns:
- The second file relevant to this error. May be
null. This field can only be present, ifgetFile1()is present.
-
hasFile2
public boolean hasFile2()
- Returns:
trueif the second file is present,falseif not.
-
getException
@Nullable public Exception getException()
- Returns:
- The exception passed in the constructor. May be
null.
-
hasException
public boolean hasException()
- Returns:
trueif an exception is present,falseif not.
-
withoutErrorCode
@Nonnull public FileIOError withoutErrorCode()
-
-