Package io.github.astrapi69.file.compare
Class FileCompareResultBean
java.lang.Object
io.github.astrapi69.file.compare.FileCompareResultBean
- All Implemented Interfaces:
IFileCompareResultBean
- Direct Known Subclasses:
FileContentResultBean
The class FileCompareResultBean is pojo for comparing two files.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileCompareResultBean
(File source, File compare) Instantiates a new file compare result bean. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Internal method for checking if another object can be considered equal to this one.boolean
boolean
Gets the absolute path equality.boolean
Gets the file extension equality.Gets the file to compare.boolean
Gets the last modified equality.boolean
Gets the length equality.boolean
Gets the name equality.Gets the source file.int
hashCode()
void
setAbsolutePathEquality
(Boolean absolutePathEquality) Sets the absolute path equality.void
setCompare
(File compare) Sets the file to compare against.void
setFileExtensionEquality
(Boolean fileExtensionEquality) Sets the file extension equality.void
setLastModifiedEquality
(Boolean lastModifiedEquality) Sets the last modified equality.void
setLengthEquality
(Boolean lengthEquality) Sets the length equality.void
setNameEquality
(Boolean nameEquality) Sets the name equality.void
Sets the source file used as reference for comparison.toString()
-
Field Details
-
compare
The compare file. -
source
The source file.
-
-
Constructor Details
-
FileCompareResultBean
Instantiates a new file compare result bean.- Parameters:
source
- the source file.compare
- the compare file.
-
-
Method Details
-
canEqual
Internal method for checking if another object can be considered equal to this one.- Parameters:
other
- the object to compare with- Returns:
- true if the objects can be considered equal, false otherwise
-
equals
-
getAbsolutePathEquality
public boolean getAbsolutePathEquality()Gets the absolute path equality.- Specified by:
getAbsolutePathEquality
in interfaceIFileCompareResultBean
- Returns:
- the absolute path equality the absolute path equality
- See Also:
-
setAbsolutePathEquality
Description copied from interface:IFileCompareResultBean
Sets the absolute path equality.- Specified by:
setAbsolutePathEquality
in interfaceIFileCompareResultBean
- Parameters:
absolutePathEquality
- the new absolute path equality
-
getFileExtensionEquality
public boolean getFileExtensionEquality()Gets the file extension equality.- Specified by:
getFileExtensionEquality
in interfaceIFileCompareResultBean
- Returns:
- the file extension equality the file extension equality
- See Also:
-
setFileExtensionEquality
Sets the file extension equality.- Specified by:
setFileExtensionEquality
in interfaceIFileCompareResultBean
- Parameters:
fileExtensionEquality
- the new file extension equality the new file extension equality- See Also:
-
getFileToCompare
Gets the file to compare.- Specified by:
getFileToCompare
in interfaceIFileCompareResultBean
- Returns:
- the file to compare Returns the file to compare.
- See Also:
-
getLastModifiedEquality
public boolean getLastModifiedEquality()Gets the last modified equality.- Specified by:
getLastModifiedEquality
in interfaceIFileCompareResultBean
- Returns:
- the last modified equality the last modified equality
- See Also:
-
setLastModifiedEquality
Sets the last modified equality.- Specified by:
setLastModifiedEquality
in interfaceIFileCompareResultBean
- Parameters:
lastModifiedEquality
- the new last modified equality the new last modified equality- See Also:
-
getLengthEquality
public boolean getLengthEquality()Gets the length equality.- Specified by:
getLengthEquality
in interfaceIFileCompareResultBean
- Returns:
- the length equality the length equality
- See Also:
-
setLengthEquality
Sets the length equality.- Specified by:
setLengthEquality
in interfaceIFileCompareResultBean
- Parameters:
lengthEquality
- the new length equality the new length equality- See Also:
-
getNameEquality
public boolean getNameEquality()Gets the name equality.- Specified by:
getNameEquality
in interfaceIFileCompareResultBean
- Returns:
- the name equality the name equality
- See Also:
-
setNameEquality
Sets the name equality.- Specified by:
setNameEquality
in interfaceIFileCompareResultBean
- Parameters:
nameEquality
- the new name equality the new name equality- See Also:
-
getSourceFile
Gets the source file.- Specified by:
getSourceFile
in interfaceIFileCompareResultBean
- Returns:
- the source file Returns the source file.
- See Also:
-
hashCode
public int hashCode() -
setCompare
Sets the file to compare against.- Parameters:
compare
- the file to compare against
-
setSource
Sets the source file used as reference for comparison.- Parameters:
source
- the source file
-
toString
-