예제 #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;
 }