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

LearnLib / learnlib / 6433387082

06 Oct 2023 03:10PM UTC coverage: 92.296% (-0.007%) from 92.303%
6433387082

push

github

mtf90
update Falk's developer id

11573 of 12539 relevant lines covered (92.3%)

1.67 hits per line

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

76.47
/oracles/filters/reuse/src/main/java/de/learnlib/filter/reuse/tree/ReuseEdge.java
1
/* Copyright (C) 2013-2023 TU Dortmund
2
 * This file is part of LearnLib, http://www.learnlib.de/.
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 de.learnlib.filter.reuse.tree;
17

18
/**
19
 * A {@link ReuseEdge} connects two {@link ReuseNode}'s in the {@link ReuseTree} and is labeled with input and output
20
 * behavior. Please note that an edge may be reflexive if domain knowledge is used (input is invariant and/or output is
21
 * a failure output).
22
 *
23
 * @param <S>
24
 *         system state class
25
 * @param <I>
26
 *         input symbol class
27
 * @param <O>
28
 *         output symbol class
29
 */
30
public class ReuseEdge<S, I, O> {
31

32
    private final ReuseNode<S, I, O> source;
33
    private final ReuseNode<S, I, O> target;
34
    private final I input;
35
    private final O output;
36

37
    /**
38
     * Default constructor.
39
     *
40
     * @param source
41
     *         not allowed to be {@code null}.
42
     * @param target
43
     *         not allowed to be {@code null}.
44
     * @param input
45
     *         not allowed to be {@code null}.
46
     * @param output
47
     *         in case of quiescence maybe {@code null}.
48
     */
49
    public ReuseEdge(ReuseNode<S, I, O> source, ReuseNode<S, I, O> target, I input, O output) {
2✔
50
        if (source == null) {
2✔
51
            throw new IllegalArgumentException("Source not allowed to be null.");
×
52
        }
53
        if (target == null) {
2✔
54
            throw new IllegalArgumentException("Target not allowed to be null.");
×
55
        }
56
        if (input == null) {
2✔
57
            throw new IllegalArgumentException("Input not allowed to be null.");
×
58
        }
59
        this.source = source;
2✔
60
        this.target = target;
2✔
61
        this.input = input;
2✔
62
        this.output = output;
2✔
63
    }
2✔
64

65
    /**
66
     * The source node from this edge.
67
     *
68
     * @return source, never {@code null}.
69
     */
70
    public final ReuseNode<S, I, O> getSource() {
71
        return source;
×
72
    }
73

74
    /**
75
     * The target node from this edge.
76
     *
77
     * @return target, never {@code null}.
78
     */
79
    public final ReuseNode<S, I, O> getTarget() {
80
        return target;
2✔
81
    }
82

83
    /**
84
     * The respective input on this edge, never {@code null}.
85
     *
86
     * @return input, not {@code null}
87
     */
88
    public final I getInput() {
89
        return input;
2✔
90
    }
91

92
    /**
93
     * The respective output on this edge. In case of quiescence the output is {@code null}.
94
     *
95
     * @return output
96
     */
97
    public final O getOutput() {
98
        return output;
2✔
99
    }
100

101
    @Override
102
    public final String toString() {
103
        return source + " -> " + target + " i/o " + input + "/" + output;
2✔
104
    }
105
}
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