com.perforce.p4java.core.file
Enum DiffType

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

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 Summary
CONTEXT_DIFF
           
IGNORE_LINE_ENDINGS
           
IGNORE_WS
           
IGNORE_WS_CHANGES
           
RCS_DIFF
           
SUMMARY_DIFF
           
UNIFIED_DIFF
           
 
Method Summary
 boolean isWsOption()
          Return true if this is a "whitespace option", i.e.
 String toArgString()
          Return the value in p4 command single character form.
static DiffType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DiffType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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 Detail

values

public static DiffType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DiffType c : DiffType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DiffType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.


Copyright © 2015 Perforce Software. All Rights Reserved.