org.eclipse.jgit.revwalk

## Class RevObject

- 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>

Direct Known Subclasses:
  RevBlob, RevCommit, RevTag, RevTree

    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
`void` `add(RevFlag flag)` Add a flag to this object.
`void` `add(RevFlagSet set)` Add a set of flags to this object.
`protected void` `appendCoreFlags(StringBuilder s)`
`ObjectId` `getId()` Get the name of this object.
`abstract int` `getType()` Get Git object type.
`boolean` `has(RevFlag flag)` Test to see if the flag has been set on this object.
`boolean` `hasAll(RevFlagSet set)` Test to see if all flags in the set have been set on this object.
`boolean` `hasAny(RevFlagSet set)` Test to see if any flag in the set has been set on this object.
`void` `remove(RevFlag flag)` Remove a flag from this object.
`void` `remove(RevFlagSet set)` Remove a set of flags from this object.
`String` `toString()`

### Methods inherited from class org.eclipse.jgit.lib.ObjectId

`equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId`

### Methods inherited from class org.eclipse.jgit.lib.AnyObjectId

`abbreviate, compareTo, compareTo, compareTo, copy, copyRawTo, copyRawTo, copyRawTo, copyRawTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, equals, equals, equals, getByte, getFirstByte, getName, hashCode, name, startsWith`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### getType

    public abstract int getType()

Get Git object type. See `Constants`.

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:
  `toString` in class `AnyObjectId`

#### appendCoreFlags

    protected void appendCoreFlags(StringBuilder s)

Parameters:
  `s` - buffer to append a debug description of core RevFlags onto.