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

LearnLib / automatalib / 12653051383

07 Jan 2025 02:07PM UTC coverage: 91.574% (+0.005%) from 91.569%
12653051383

push

github

mtf90
ads: cleanup variable names

4 of 6 new or added lines in 2 files covered. (66.67%)

16573 of 18098 relevant lines covered (91.57%)

1.69 hits per line

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

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

18
import java.util.Collections;
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 leaf 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 AbstractRecursiveADSLeafNode<S, I, O, N extends RecursiveADSNode<S, I, O, N>>
37
        implements RecursiveADSNode<S, I, O, N> {
38

39
    private @Nullable N parent;
40
    private S state;
41

42
    public AbstractRecursiveADSLeafNode(@Nullable N parent, S state) {
1✔
43
        this.parent = parent;
1✔
44
        this.state = state;
1✔
45
    }
1✔
46

47
    @Override
48
    public @Nullable I getSymbol() {
49
        return null;
×
50
    }
51

52
    @Override
53
    public void setSymbol(I symbol) {
54
        throw new UnsupportedOperationException("Cannot set symbol state on a leaf node");
×
55
    }
56

57
    @Override
58
    public @Nullable N getParent() {
59
        return this.parent;
1✔
60
    }
61

62
    @Override
63
    public void setParent(@Nullable N parent) {
64
        this.parent = parent;
1✔
65
    }
1✔
66

67
    @Override
68
    public Map<O, N> getChildren() {
69
        return Collections.emptyMap();
1✔
70
    }
71

72
    @Override
73
    public boolean isLeaf() {
74
        return true;
1✔
75
    }
76

77
    @Override
78
    public S getState() {
79
        return this.state;
1✔
80
    }
81

82
    @Override
83
    public void setState(S state) {
NEW
84
        this.state = state;
×
85
    }
×
86

87
    @Override
88
    public String toString() {
NEW
89
        return String.valueOf(this.state);
×
90
    }
91
}
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