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

LearnLib / automatalib / 6763327895

05 Nov 2023 07:29PM UTC coverage: 89.726% (-0.1%) from 89.868%
6763327895

push

github

mtf90
fix typo

4 of 4 new or added lines in 4 files covered. (100.0%)

99 existing lines in 18 files now uncovered.

15677 of 17472 relevant lines covered (89.73%)

1.66 hits per line

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

88.89
/incremental/src/main/java/net/automatalib/incremental/dfa/AbstractIncrementalDFABuilder.java
1
/* Copyright (C) 2013-2023 TU Dortmund
2
 * This file is part of AutomataLib, http://www.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.incremental.dfa;
17

18
import net.automatalib.alphabet.Alphabet;
19
import net.automatalib.alphabet.Alphabets;
20
import net.automatalib.automaton.concept.InputAlphabetHolder;
21

22
/**
23
 * Abstract base class for {@link IncrementalDFABuilder}s. This class takes care of holding the input alphabet and its
24
 * size.
25
 *
26
 * @param <I>
27
 *         input symbol class
28
 */
29
public abstract class AbstractIncrementalDFABuilder<I> implements IncrementalDFABuilder<I>, InputAlphabetHolder<I> {
30

31
    protected final Alphabet<I> inputAlphabet;
32
    protected int alphabetSize;
33

34
    /**
35
     * Constructor.
36
     *
37
     * @param inputAlphabet
38
     *         the input alphabet
39
     */
40
    public AbstractIncrementalDFABuilder(Alphabet<I> inputAlphabet) {
2✔
41
        this.inputAlphabet = inputAlphabet;
2✔
42
        this.alphabetSize = inputAlphabet.size();
2✔
43
    }
2✔
44

45
    @Override
46
    public Alphabet<I> getInputAlphabet() {
UNCOV
47
        return inputAlphabet;
×
48
    }
49

50
    @Override
51
    public void addAlphabetSymbol(I symbol) {
52
        if (!this.inputAlphabet.containsSymbol(symbol)) {
2✔
53
            Alphabets.toGrowingAlphabetOrThrowException(this.inputAlphabet).addSymbol(symbol);
2✔
54
        }
55

56
        this.alphabetSize = this.inputAlphabet.size();
2✔
57
    }
2✔
58

59
}
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

© 2025 Coveralls, Inc