Enum Class DiffType

java.lang.Object
java.lang.Enum<DiffType>
com.perforce.p4java.core.file.DiffType
All Implemented Interfaces:
Serializable, Comparable<DiffType>, Constable

public enum DiffType extends Enum<DiffType>
Describes the various type of file version diffs and related whitespace options available through the relevant content diff, resolve, annotate, etc., methods, corresponding loosely to the "-d" series of options to the p4 command line app.

The diff types are explained in detail in the main Perforce documentation and will not be detailed here.

  • Enum Constant Details

    • RCS_DIFF

      public static final DiffType RCS_DIFF
    • CONTEXT_DIFF

      public static final DiffType CONTEXT_DIFF
    • SUMMARY_DIFF

      public static final DiffType SUMMARY_DIFF
    • UNIFIED_DIFF

      public static final DiffType UNIFIED_DIFF
    • IGNORE_WS_CHANGES

      public static final DiffType IGNORE_WS_CHANGES
    • IGNORE_WS

      public static final DiffType IGNORE_WS
    • IGNORE_LINE_ENDINGS

      public static final DiffType IGNORE_LINE_ENDINGS
  • Method Details

    • values

      public static DiffType[] 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 DiffType 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
    • toArgString

      public String toArgString()
      Return the value in p4 command single character form.
      Returns:
      single-char String representing the diff format as used by the various P4 commands.
    • isWsOption

      public boolean isWsOption()
      Return true if this is a "whitespace option", i.e. one of the -db, -dl, or -dw options.
      Returns:
      true iff this is a whitespace diff option.