Ejemplo n.º 1
0
        public object Clone()
        {
            // LUCENENET: MemberwiseClone() doesn't throw in .NET
            TermBuffer clone = (TermBuffer)base.MemberwiseClone();

            clone.bytes = BytesRef.DeepCopyOf(bytes);
            return(clone);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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));
            }
        }
Ejemplo n.º 4
0
        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);
        }