Enum Class Comparison.Method

java.lang.Object
java.lang.Enum<Comparison.Method>
com.deltawalker.script.Comparison.Method
All Implemented Interfaces:
Serializable, Comparable<Comparison.Method>, Constable
Enclosing interface:
Comparison

public static enum Comparison.Method extends Enum<Comparison.Method>
The individual comparison methods - by size, date, attributes, as text, and byte by byte.

The methods fall into two groups:

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
  • Enum Constant Details

    • AS_TEXT

      public static final Comparison.Method AS_TEXT
      Compares file content using a text comparison algorithm.
    • ATTRIBUTES

      public static final Comparison.Method ATTRIBUTES
      Compares the attributes (Windows) or permissions (macOS, Linux) of files.
    • BYTE_BY_BYTE

      public static final Comparison.Method BYTE_BY_BYTE
      Compares file content byte by byte.
    • DATE_MODIFIED

      public static final Comparison.Method DATE_MODIFIED
      Compares the last-modified dates of files.
      See Also:
    • SIZE

      public static final Comparison.Method SIZE
      Compares the sizes of files.
  • Method Details

    • values

      public static Comparison.Method[] 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

      public static Comparison.Method valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toDisplayString

      public String 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

      public String toToolTipString()
      Returns the tooltip text associated with this method in the DeltaWalker UI.
      Returns:
      the tooltip string associated with this constant
      Since:
      2.0