Ejemplo n.º 1
0
 public void  Set(TermBuffer other)
 {
     text.CopyText(other.text);
     dirty = true;
     field = other.field;
     term  = other.term;
 }
Ejemplo n.º 2
0
		private Term term; // cached
		
		public int CompareTo(TermBuffer other)
		{
			if (field == other.field)
				// fields are interned
				return CompareChars(text, textLength, other.text, other.textLength);
			else
				return String.CompareOrdinal(field, other.field);
		}
Ejemplo n.º 3
0
 public int CompareTo(TermBuffer other)
 {
     if ((System.Object) field == (System.Object) other.field)
     // fields are interned
         return CompareChars(text.result, text.length, other.text.result, other.text.length);
     else
         return String.CompareOrdinal(field, other.field);
 }
Ejemplo n.º 4
0
        public void  Set(TermBuffer other)
        {
            SetTextLength(other.textLength);
            Array.Copy(other.text, 0, text, 0, textLength);

            this.field = other.field;
            this.term  = other.term;
        }
Ejemplo n.º 5
0
 /// <summary>Optimized scan, without allocating new terms. </summary>
 internal void  ScanTo(Term term)
 {
     if (scratch == null)
     {
         scratch = new TermBuffer();
     }
     scratch.Set(term);
     while (scratch.CompareTo(termBuffer) > 0 && Next())
     {
     }
 }
Ejemplo n.º 6
0
 public int CompareTo(TermBuffer other)
 {
     if ((System.Object)field == (System.Object)other.field)
     {
         // fields are interned
         return(CompareChars(text.result, text.length, other.text.result, other.text.length));
     }
     else
     {
         return(String.CompareOrdinal(field, other.field));
     }
 }
Ejemplo n.º 7
0
        private Term term;         // cached

        public int CompareTo(TermBuffer other)
        {
            if (field == other.field)
            {
                // fields are interned
                return(CompareChars(text, textLength, other.text, other.textLength));
            }
            else
            {
                return(String.CompareOrdinal(field, other.field));
            }
        }
Ejemplo n.º 8
0
        public System.Object Clone()
        {
            TermBuffer clone = null;

            try
            {
                clone = (TermBuffer)base.MemberwiseClone();
            }
            catch (System.Exception)
            {
            }

            clone.text = new char[text.Length];
            Array.Copy(text, 0, clone.text, 0, textLength);

            return(clone);
        }
Ejemplo n.º 9
0
        public System.Object Clone()
        {
            TermBuffer clone = null;

            try
            {
                clone = (TermBuffer)base.MemberwiseClone();
            }
            catch (System.Exception e)
            {
            }

            clone.dirty = true;
            clone.bytes = new UnicodeUtil.UTF8Result();
            clone.text  = new UnicodeUtil.UTF16Result();
            clone.text.CopyText(text);
            return(clone);
        }
Ejemplo n.º 10
0
		/// <summary>Optimized scan, without allocating new terms. </summary>
		internal void  ScanTo(Term term)
		{
			if (scratch == null)
				scratch = new TermBuffer();
			scratch.Set(term);
			while (scratch.CompareTo(termBuffer) > 0 && Next())
			{
			}
		}
Ejemplo n.º 11
0
		public void  Set(TermBuffer other)
		{
			SetTextLength(other.textLength);
			Array.Copy(other.text, 0, text, 0, textLength);
			
			this.field = other.field;
			this.term = other.term;
		}
Ejemplo n.º 12
0
 public void Set(TermBuffer other)
 {
     text.CopyText(other.text);
     dirty = true;
     field = other.field;
     term = other.term;
 }