Package org.eclipse.jgit.lib
Enum IndexDiff.StageState
- java.lang.Object
-
- java.lang.Enum<IndexDiff.StageState>
-
- org.eclipse.jgit.lib.IndexDiff.StageState
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexDiff.StageState>
- Enclosing class:
- IndexDiff
public static enum IndexDiff.StageState extends Enum<IndexDiff.StageState>
Represents the state of the index for a certain path regarding the stages - which stages exist for a path and which not (base, ours, theirs).This is used for figuring out what kind of conflict occurred.
- Since:
- 3.0
- See Also:
IndexDiff.getConflictingStageStates()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDED_BY_THEM
Only exists in theirs.ADDED_BY_US
Only exists in ours.BOTH_ADDED
Exists in ours and theirs, but not in base.BOTH_DELETED
Exists in base, but neither in ours nor in theirs.BOTH_MODIFIED
Exists in all stages, content conflict.DELETED_BY_THEM
Exists in base and ours, but no in theirs.DELETED_BY_US
Exists in base and theirs, but not in ours.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasBase()
boolean
hasOurs()
boolean
hasTheirs()
static IndexDiff.StageState
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexDiff.StageState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOTH_DELETED
public static final IndexDiff.StageState BOTH_DELETED
Exists in base, but neither in ours nor in theirs.
-
ADDED_BY_US
public static final IndexDiff.StageState ADDED_BY_US
Only exists in ours.
-
DELETED_BY_THEM
public static final IndexDiff.StageState DELETED_BY_THEM
Exists in base and ours, but no in theirs.
-
ADDED_BY_THEM
public static final IndexDiff.StageState ADDED_BY_THEM
Only exists in theirs.
-
DELETED_BY_US
public static final IndexDiff.StageState DELETED_BY_US
Exists in base and theirs, but not in ours.
-
BOTH_ADDED
public static final IndexDiff.StageState BOTH_ADDED
Exists in ours and theirs, but not in base.
-
BOTH_MODIFIED
public static final IndexDiff.StageState BOTH_MODIFIED
Exists in all stages, content conflict.
-
-
Method Detail
-
values
public static IndexDiff.StageState[] 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 (IndexDiff.StageState c : IndexDiff.StageState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexDiff.StageState 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 nameNullPointerException
- if the argument is null
-
hasBase
public boolean hasBase()
- Returns:
- whether there is a "base" stage entry
-
hasOurs
public boolean hasOurs()
- Returns:
- whether there is an "ours" stage entry
-
hasTheirs
public boolean hasTheirs()
- Returns:
- whether there is a "theirs" stage entry
-
-