public enum GitDiffHeaderType extends Enum<GitDiffHeaderType>
GitDiffHeader
.Enum Constant and Description |
---|
INDEX
Index data, of the format
<source hash>..<destination hash> <optional mode> . |
MODE
File mode, as a 6-digit octal number defining both type and permission bits, either for a
source or destination . |
PATH
Path, either for a
source or destination . |
PERCENTAGE
A percentage, comprised of a rounded down integer followed by a percent sign.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTargeted()
Retrieves a flag indicating whether this type of data requires a specific
GitDiffTarget . |
static GitDiffHeaderType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GitDiffHeaderType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
verify(GitDiffTarget target)
Verifies that the provided
GitDiffTarget is valid for use with this header type. |
public static final GitDiffHeaderType INDEX
<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.
public static final GitDiffHeaderType MODE
source
or destination
.public static final GitDiffHeaderType PATH
source
or destination
.public static final GitDiffHeaderType PERCENTAGE
public static GitDiffHeaderType[] values()
for (GitDiffHeaderType c : GitDiffHeaderType.values()) System.out.println(c);
public static GitDiffHeaderType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isTargeted()
GitDiffTarget
.true
if a target is required; otherwise, false
public void verify(GitDiffTarget target)
GitDiffTarget
is valid for use with this header type.target
- the target to verifyIllegalArgumentException
- Thrown if the provided target
is not valid for this header type.Copyright © 2020 Atlassian. All rights reserved.