Package com.helger.commons.io.file
Class FileIOError
java.lang.Object
com.helger.commons.io.file.FileIOError
- All Implemented Interfaces:
ISuccessIndicator
Represents an error with an additional error object.
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionFileIOError(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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.state.ISuccessIndicator
and, isFailure, or
-
Constructor Details
-
FileIOError
-
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 Details
-
getOperation
- Returns:
- The operation passed in the constructor. Never
null.
-
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
- 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
- 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
- Returns:
- The exception passed in the constructor. May be
null.
-
hasException
public boolean hasException()- Returns:
trueif an exception is present,falseif not.
-
withoutErrorCode
-
equals
-
hashCode
public int hashCode() -
toString
-