Package com.deltawalker.script
Enum Class Comparison.Method
- All Implemented Interfaces:
Serializable,Comparable<Comparison.Method>,Constable
- Enclosing interface:
Comparison
The individual comparison methods - by size, date, attributes, as text,
and byte by byte.
The methods fall into two groups:
- Quick (
SIZE,DATE_MODIFIED,ATTRIBUTES): only the attributes of files and folders are read and compared. - Thorough (
AS_TEXT,BYTE_BY_BYTE): files are opened and their content is read and compared.
The methods a folder comparison uses are set through its settings, as either a single method or an array of methods:
const SettingKey = Java.type('com.deltopia.io.SettingKey');
comp.getSettings().set(SettingKey.D_COMP_METHOD, [
Comparison.Method.SIZE,
Comparison.Method.DATE_MODIFIED
]);
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCompares file content using a text comparison algorithm.Compares the attributes (Windows) or permissions (macOS, Linux) of files.Compares file content byte by byte.Compares the last-modified dates of files.Compares the sizes of files. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of this method as displayed in the DeltaWalker UI.inttoInt()Returns the integer value of this method.Returns the tooltip text associated with this method in the DeltaWalker UI.static Comparison.MethodReturns the enum constant of this class with the specified name.static Comparison.Method[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
AS_TEXT
Compares file content using a text comparison algorithm. -
ATTRIBUTES
Compares the attributes (Windows) or permissions (macOS, Linux) of files. -
BYTE_BY_BYTE
Compares file content byte by byte. -
DATE_MODIFIED
Compares the last-modified dates of files.- See Also:
-
SIZE
Compares the sizes of files.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toDisplayString
Returns the name of this method as displayed in the DeltaWalker UI.- Returns:
- the user-friendly display string
- Since:
- 2.0
-
toInt
public int toInt()Returns the integer value of this method. Values are distinct bit flags, so a combination of methods can be represented by OR-ing them together.- Returns:
- the integer value of this constant
- Since:
- 2.0
-
toToolTipString
Returns the tooltip text associated with this method in the DeltaWalker UI.- Returns:
- the tooltip string associated with this constant
- Since:
- 2.0
-