Package org.eclipse.jgit.lib
Enum Class IndexDiff.StageState
- All Implemented Interfaces:
Serializable
,Comparable<IndexDiff.StageState>
,Constable
- Enclosing class:
- IndexDiff
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnly exists in theirs.Only exists in ours.Exists in ours and theirs, but not in base.Exists in base, but neither in ours nor in theirs.Exists in all stages, content conflict.Exists in base and ours, but no in theirs.Exists in base and theirs, but not in ours. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static IndexDiff.StageState
fromMask
(int stageMask) (package private) int
boolean
hasBase()
boolean
hasOurs()
boolean
static IndexDiff.StageState
Returns the enum constant of this class with the specified name.static IndexDiff.StageState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOTH_DELETED
Exists in base, but neither in ours nor in theirs. -
ADDED_BY_US
Only exists in ours. -
DELETED_BY_THEM
Exists in base and ours, but no in theirs. -
ADDED_BY_THEM
Only exists in theirs. -
DELETED_BY_US
Exists in base and theirs, but not in ours. -
BOTH_ADDED
Exists in ours and theirs, but not in base. -
BOTH_MODIFIED
Exists in all stages, content conflict.
-
-
Field Details
-
stageMask
private final int stageMask
-
-
Constructor Details
-
StageState
private StageState(int stageMask)
-
-
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
-
getStageMask
int getStageMask() -
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
-
fromMask
-