- java.lang.Object
-
- org.eclipse.jgit.lib.AnyObjectId
-
- org.eclipse.jgit.lib.ObjectId
-
- org.eclipse.jgit.lib.ObjectIdOwnerMap.Entry
-
- org.eclipse.jgit.revwalk.RevObject
-
- All Implemented Interfaces:
Serializable,Comparable<AnyObjectId>
public abstract class RevObject extends ObjectIdOwnerMap.Entry
Base object type accessed during revision walking.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(RevFlag flag)Add a flag to this object.voidadd(RevFlagSet set)Add a set of flags to this object.protected voidappendCoreFlags(StringBuilder s)Append a debug description of core RevFlags to a buffer.ObjectIdgetId()Get the name of this object.abstract intgetType()Get Git object type.booleanhas(RevFlag flag)Test to see if the flag has been set on this object.booleanhasAll(RevFlagSet set)Test to see if all flags in the set have been set on this object.booleanhasAny(RevFlagSet set)Test to see if any flag in the set has been set on this object.voidremove(RevFlag flag)Remove a flag from this object.voidremove(RevFlagSet set)Remove a set of flags from this object.StringtoString()-
Methods inherited from class org.eclipse.jgit.lib.ObjectId
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId
-
-
-
-
Method Detail
-
getType
public abstract int getType()
Get Git object type. SeeConstants.- Returns:
- object type
-
getId
public final ObjectId getId()
Get the name of this object.- Returns:
- unique hash of this object.
-
has
public final boolean has(RevFlag flag)
Test to see if the flag has been set on this object.- Parameters:
flag- the flag to test.- Returns:
- true if the flag has been added to this object; false if not.
-
hasAny
public final boolean hasAny(RevFlagSet set)
Test to see if any flag in the set has been set on this object.- Parameters:
set- the flags to test.- Returns:
- true if any flag in the set has been added to this object; false if not.
-
hasAll
public final boolean hasAll(RevFlagSet set)
Test to see if all flags in the set have been set on this object.- Parameters:
set- the flags to test.- Returns:
- true if all flags of the set have been added to this object; false if some or none have been added.
-
add
public final void add(RevFlag flag)
Add a flag to this object.If the flag is already set on this object then the method has no effect.
- Parameters:
flag- the flag to mark on this object, for later testing.
-
add
public final void add(RevFlagSet set)
Add a set of flags to this object.- Parameters:
set- the set of flags to mark on this object, for later testing.
-
remove
public final void remove(RevFlag flag)
Remove a flag from this object.If the flag is not set on this object then the method has no effect.
- Parameters:
flag- the flag to remove from this object.
-
remove
public final void remove(RevFlagSet set)
Remove a set of flags from this object.- Parameters:
set- the flag to remove from this object.
-
toString
public String toString()
- Overrides:
toStringin classAnyObjectId
-
appendCoreFlags
protected void appendCoreFlags(StringBuilder s)
Append a debug description of core RevFlags to a buffer.- Parameters:
s- buffer to append a debug description of core RevFlags onto.
-
-