idBuffer() public abstract method

Get the byte array buffer object IDs must be copied out of. The id buffer contains the bytes necessary to construct an ObjectId for the current entry of this iterator. The buffer can be the same buffer for all entries, or it can be a unique buffer per-entry. Implementations are encouraged to expose their private buffer whenever possible to reduce garbage generation and copying costs.
public abstract idBuffer ( ) : byte[]
return byte[]
示例#1
0
 /// <summary>
 /// Check if the current entry of both iterators has the same id.
 /// <para />
 /// This method is faster than <see cref="getEntryObjectId()"/>as it does not
 /// require copying the bytes out of the buffers. A direct <see cref="idBuffer"/>
 /// compare operation is performed.
 /// </summary>
 /// <param name="otherIterator">the other iterator to test against.</param>
 /// <returns>
 /// true if both iterators have the same object id; false otherwise.
 /// </returns>
 public virtual bool idEqual(AbstractTreeIterator otherIterator)
 {
     if (otherIterator == null)
     {
         throw new ArgumentNullException("otherIterator");
     }
     return(ObjectId.Equals(idBuffer(), idOffset(), otherIterator.idBuffer(), otherIterator.idOffset()));
 }
示例#2
0
 /// <summary>
 /// Check if the current entry of both iterators has the same id.
 /// <para />
 /// This method is faster than <see cref="getEntryObjectId()"/>as it does not
 /// require copying the bytes out of the buffers. A direct <see cref="idBuffer"/>
 /// compare operation is performed.
 /// </summary>
 /// <param name="otherIterator">the other iterator to test against.</param>
 /// <returns>
 /// true if both iterators have the same object id; false otherwise.
 /// </returns>
 public virtual bool idEqual(AbstractTreeIterator otherIterator)
 {
     return(ObjectId.Equals(idBuffer(), idOffset(), otherIterator.idBuffer(), otherIterator.idOffset()));
 }
 /// <summary>
 /// Check if the current entry of both iterators has the same id.
 /// <para />
 /// This method is faster than <see cref="getEntryObjectId()"/>as it does not
 /// require copying the bytes out of the buffers. A direct <see cref="idBuffer"/>
 /// compare operation is performed.
 /// </summary>
 /// <param name="otherIterator">the other iterator to test against.</param>
 /// <returns>
 /// true if both iterators have the same object id; false otherwise.
 /// </returns>
 public virtual bool idEqual(AbstractTreeIterator otherIterator)
 {
     if (otherIterator == null)
         throw new ArgumentNullException ("otherIterator");
     return ObjectId.Equals(idBuffer(), idOffset(), otherIterator.idBuffer(), otherIterator.idOffset());
 }
 /// <summary>
 /// Check if the current entry of both iterators has the same id.
 /// <para />
 /// This method is faster than <see cref="getEntryObjectId()"/>as it does not
 /// require copying the bytes out of the buffers. A direct <see cref="idBuffer"/>
 /// compare operation is performed.
 /// </summary>
 /// <param name="otherIterator">the other iterator to test against.</param>
 /// <returns>
 /// true if both iterators have the same object id; false otherwise.
 /// </returns>
 public virtual bool idEqual(AbstractTreeIterator otherIterator)
 {
     return ObjectId.Equals(idBuffer(), idOffset(), otherIterator.idBuffer(), otherIterator.idOffset());
 }