コード例 #1
0
ファイル: BytesRef.cs プロジェクト: zfxsss/lucenenet
 /// <summary>
 /// Used to grow the reference array.
 ///
 /// In general this should not be used as it does not take the offset into account.
 /// @lucene.internal
 /// </summary>
 public void Grow(int newLength)
 {
     Debug.Assert(Offset == 0); // NOTE: senseless if offset != 0
     Bytes = ArrayUtil.Grow(Bytes, newLength);
 }
コード例 #2
0
 /// <summary>
 /// Expand the <see cref="T:long[]"/> with the size given as a number of words (64 bit longs). </summary>
 public virtual void EnsureCapacityWords(int numWords)
 {
     m_bits = ArrayUtil.Grow(m_bits, numWords);
     m_wlen = numWords;
     Debug.Assert((this.numBits = Math.Max(this.numBits, numWords << 6)) >= 0);
 }
コード例 #3
0
 public override int[] Grow()
 {
     Debug.Assert(BytesStart != null);
     return BytesStart = ArrayUtil.Grow(BytesStart, BytesStart.Length + 1);
 }