Beispiel #1
0
        public override void  CopyTo(Attribute target)
        {
            InitTermBuffer();
            ITermAttribute t = (ITermAttribute)target;

            t.SetTermBuffer(termBuffer, 0, termLength);
        }
Beispiel #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;
     }
 }
Beispiel #3
0
		public override void  CopyTo(Attribute target)
		{
			InitTermBuffer();
			ITermAttribute t = (ITermAttribute) target;
			t.SetTermBuffer(termBuffer, 0, termLength);
		}