示例#1
0
 @Override
 protected E findNext() {
   if (pos == count) return null;
   while (true) {
     E next = sequence.next();
     if (next == null) {
       pos++;
       if (pos == count) return null;
       sequence = sequence.copy();
     } else return next;
   }
 }
示例#2
0
 @Override
 public int length() {
   return sequence.length() * count;
 }
示例#3
0
 @Override
 public RepeatSequence<E> copy() {
   return new RepeatSequence<E>(sequence.copy(), count);
 }
示例#4
0
 private void _reset() {
   sequence = sequence.copy();
   pos = 0;
 }