Ejemplo n.º 1
0
        public override void  CopyTo(Attribute target)
        {
            InitTermBuffer();
            ITermAttribute t = (ITermAttribute)target;

            t.SetTermBuffer(termBuffer, 0, termLength);
        }
Ejemplo n.º 2
0
 public override void  CopyTo(Attribute target)
 {
     if (target is Token)
     {
         var to = (Token)target;
         to.Reinit(this);
         // reinit shares the payload, so clone it:
         if (payload != null)
         {
             to.payload = (Payload)payload.Clone();
         }
     }
     else
     {
         InitTermBuffer();
         ((ITermAttribute)target).SetTermBuffer(termBuffer, 0, termLength);
         ((IOffsetAttribute)target).SetOffset(startOffset, endOffset);
         ((IPositionIncrementAttribute)target).PositionIncrement = positionIncrement;
         ((IPayloadAttribute)target).Payload = (payload == null)?null:(Payload)payload.Clone();
         ((IFlagsAttribute)target).Flags     = flags;
         ((ITypeAttribute)target).Type       = type;
     }
 }
Ejemplo n.º 3
0
		public override void  CopyTo(Attribute target)
		{
			InitTermBuffer();
			ITermAttribute t = (ITermAttribute) target;
			t.SetTermBuffer(termBuffer, 0, termLength);
		}