• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / automatalib / 12771457454

14 Jan 2025 03:47PM UTC coverage: 91.741% (+0.1%) from 91.62%
12771457454

push

github

mtf90
cleanup type parameters of EmptyWord

2 of 2 new or added lines in 1 file covered. (100.0%)

35 existing lines in 10 files now uncovered.

16551 of 18041 relevant lines covered (91.74%)

1.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/commons/util/src/main/java/net/automatalib/common/util/array/ArrayIterator.java
1
/* Copyright (C) 2013-2025 TU Dortmund University
2
 * This file is part of AutomataLib <https://automatalib.net>.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package net.automatalib.common.util.array;
17

18
import java.util.Iterator;
19
import java.util.NoSuchElementException;
20

21
class ArrayIterator<T> implements Iterator<T> {
22

23
    private final T[] delegate;
24
    private final int end;
25
    private int idx;
26

27
    ArrayIterator(T[] delegate) {
28
        this(delegate, 0, delegate.length);
1✔
29
    }
1✔
30

31
    ArrayIterator(T[] delegate, int start, int end) {
2✔
32
        this.delegate = delegate;
2✔
33
        this.idx = start;
2✔
34
        this.end = Math.min(delegate.length, end);
2✔
35
    }
2✔
36

37
    @Override
38
    public boolean hasNext() {
39
        return idx < end;
2✔
40
    }
41

42
    @Override
43
    public T next() {
44
        if (hasNext()) {
2✔
45
            return delegate[idx++];
2✔
46
        }
47

UNCOV
48
        throw new NoSuchElementException();
×
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc