Enum Class GitDiffHeaderType
- All Implemented Interfaces:
Serializable,Comparable<GitDiffHeaderType>,Constable
Defines the type of data which is provided by a given
GitDiffHeader.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndex data, of the format<source hash>..<destination hash> <optional mode>.File mode, as a 6-digit octal number defining both type and permission bits, either for asourceordestination.Path, either for asourceordestination.A percentage, comprised of a rounded down integer followed by a percent sign. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves a flag indicating whether this type of data requires a specificGitDiffTarget.static GitDiffHeaderTypeReturns the enum constant of this class with the specified name.static GitDiffHeaderType[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidverify(GitDiffTarget target) Verifies that the providedGitDiffTargetis valid for use with this header type.
-
Enum Constant Details
-
INDEX
Index data, of the format<source hash>..<destination hash> <optional mode>.The mode is included only if it was not changed in the revision. Otherwise, separate headers provide the old and new modes and it is omitted from the index data.
-
MODE
File mode, as a 6-digit octal number defining both type and permission bits, either for asourceordestination. -
PATH
Path, either for asourceordestination. -
PERCENTAGE
A percentage, comprised of a rounded down integer followed by a percent sign.
-
-
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
-
isTargeted
public boolean isTargeted()Retrieves a flag indicating whether this type of data requires a specificGitDiffTarget.- Returns:
trueif a target is required; otherwise,false
-
verify
Verifies that the providedGitDiffTargetis valid for use with this header type.- Parameters:
target- the target to verify- Throws:
IllegalArgumentException- Thrown if the providedtargetis not valid for this header type.
-