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

            clone.bytes = BytesRef.DeepCopyOf(bytes);
            return(clone);
        }
예제 #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);
 }
예제 #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));
     }
 }
예제 #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);
     }
 }
예제 #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));
            }
        }
예제 #6
0
        public object Clone()
        {
            TermBuffer clone = null;

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