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

LearnLib / automatalib / 6673214172

27 Oct 2023 11:30PM UTC coverage: 89.166% (-0.6%) from 89.796%
6673214172

push

github

mtf90
cleanup release configuration

15399 of 17270 relevant lines covered (89.17%)

1.67 hits per line

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

68.75
/core/src/main/java/net/automatalib/graph/ads/impl/AbstractRecursiveADSSymbolNode.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.graph.ads.impl;
17

18
import java.util.HashMap;
19
import java.util.Map;
20

21
import net.automatalib.graph.ads.RecursiveADSNode;
22
import org.checkerframework.checker.nullness.qual.Nullable;
23

24
/**
25
 * An abstract implementation of a symbol node, that may be used by other ADS-extending classes.
26
 *
27
 * @param <S>
28
 *         (hypothesis) state type
29
 * @param <I>
30
 *         input alphabet type
31
 * @param <O>
32
 *         output alphabet type
33
 * @param <N>
34
 *         the concrete node type
35
 */
36
public abstract class AbstractRecursiveADSSymbolNode<S, I, O, N extends RecursiveADSNode<S, I, O, N>>
37
        implements RecursiveADSNode<S, I, O, N> {
38

39
    private @Nullable N parent;
40

41
    private I symbol;
42

43
    private final Map<O, N> successors;
44

45
    public AbstractRecursiveADSSymbolNode(@Nullable N parent, I symbol) {
1✔
46
        this.successors = new HashMap<>();
1✔
47
        this.parent = parent;
1✔
48
        this.symbol = symbol;
1✔
49
    }
1✔
50

51
    @Override
52
    public I getSymbol() {
53
        return this.symbol;
1✔
54
    }
55

56
    @Override
57
    public void setSymbol(I symbol) {
58
        this.symbol = symbol;
×
59
    }
×
60

61
    @Override
62
    public @Nullable N getParent() {
63
        return this.parent;
1✔
64
    }
65

66
    @Override
67
    public void setParent(N parent) {
68
        this.parent = parent;
1✔
69
    }
1✔
70

71
    @Override
72
    public Map<O, N> getChildren() {
73
        return this.successors;
1✔
74
    }
75

76
    @Override
77
    public boolean isLeaf() {
78
        return false;
1✔
79
    }
80

81
    @Override
82
    public @Nullable S getHypothesisState() {
83
        return null;
×
84
    }
85

86
    @Override
87
    public void setHypothesisState(S state) {
88
        throw new UnsupportedOperationException("Cannot set hypothesis state on a symbol node");
×
89
    }
90

91
    @Override
92
    public String toString() {
93
        return String.valueOf(this.symbol);
×
94
    }
95
}
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