Package com.perforce.p4java.core.file
Enum DiffType
- java.lang.Object
-
- java.lang.Enum<DiffType>
-
- com.perforce.p4java.core.file.DiffType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DiffType>
public enum DiffType extends java.lang.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
Enum Constants Enum Constant Description CONTEXT_DIFF
IGNORE_LINE_ENDINGS
IGNORE_WS
IGNORE_WS_CHANGES
RCS_DIFF
SUMMARY_DIFF
UNIFIED_DIFF
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isWsOption()
Return true if this is a "whitespace option", i.e.java.lang.String
toArgString()
Return the value in p4 command single character form.static DiffType
valueOf(java.lang.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.
-
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toArgString
public java.lang.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.
-
-