Inheritance: ICloneable
Example #1
0
        public object Clone()
        {
            // LUCENENET: MemberwiseClone() doesn't throw in .NET
            TermBuffer clone = (TermBuffer)base.MemberwiseClone();

            clone.bytes = BytesRef.DeepCopyOf(bytes);
            return(clone);
        }
Example #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);
 }
Example #3
0
 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));
     }
 }
Example #4
0
 public int CompareTo(TermBuffer other)
 {
     if (Field == other.Field) // fields are interned
     // (only by PreFlex codec)
     {
         return Utf8AsUTF16Comparator.Compare(Bytes, other.Bytes);
     }
     else
     {
         return Field.CompareTo(other.Field);
     }
 }
Example #5
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(Utf8AsUTF16Comparator.Compare(Bytes, other.Bytes));
            }
            else
            {
                return(Field.CompareTo(other.Field));
            }
        }
Example #6
0
        public object Clone()
        {
            TermBuffer clone = null;

            try
            {
                clone = (TermBuffer)base.MemberwiseClone();
            }
            catch (InvalidOperationException e)
            {
            }
            clone.Bytes = BytesRef.DeepCopyOf(Bytes);
            return(clone);
        }
Example #7
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);
        }
Example #8
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);
 }