public object Clone() { // LUCENENET: MemberwiseClone() doesn't throw in .NET TermBuffer clone = (TermBuffer)base.MemberwiseClone(); clone.bytes = BytesRef.DeepCopyOf(bytes); return(clone); }
public void Set(TermBuffer other) { field = other.field; currentFieldNumber = other.currentFieldNumber; // dangerous to copy Term over, since the underlying // BytesRef could subsequently be modified: term = null; bytes.CopyBytes(other.bytes); }
internal int newSuffixStart; // only valid right after .read is called public int CompareTo(TermBuffer other) { if (field == other.field) // fields are interned // (only by PreFlex codec) { return(utf8AsUTF16Comparer.Compare(bytes, other.bytes)); } else { return(field.CompareToOrdinal(other.field)); } }
public object Clone() { TermBuffer clone = null; try { clone = (TermBuffer)base.MemberwiseClone(); } #pragma warning disable 168 catch (InvalidOperationException e) #pragma warning restore 168 { } clone.bytes = BytesRef.DeepCopyOf(bytes); return(clone); }