Class PackIndex.MutableEntry

java.lang.Object
org.eclipse.jgit.internal.storage.file.PackIndex.MutableEntry
Enclosing interface:
PackIndex

public static class PackIndex.MutableEntry extends Object
Represent mutable entry of pack index consisting of object id and offset in pack (both mutable).
  • Constructor Details

    • MutableEntry

      public MutableEntry()
  • Method Details

    • getOffset

      public long getOffset()
      Returns offset for this index object entry
      Returns:
      offset of this object in a pack file
    • name

      public String name()
      Get hex string representation of the entry's object id
      Returns:
      hex string describing the object id of this entry.
    • toObjectId

      public ObjectId toObjectId()
      Create a copy of the object id
      Returns:
      a copy of the object id.
    • cloneEntry

      public PackIndex.MutableEntry cloneEntry()
      Clone the entry
      Returns:
      a complete copy of this entry, that won't modify
    • compareBySha1To

      public int compareBySha1To(PackIndex.MutableEntry other)
      Similar to Comparable.compareTo(Object), using only the object id in the entry.
      Parameters:
      other - Another mutable entry (probably from another index)
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
    • copyOidTo

      public void copyOidTo(MutableObjectId dest)
      Copy the current ObjectId to dest

      Like toObjectId(), but reusing the destination instead of creating a new ObjectId instance.

      Parameters:
      dest - destination for the object id