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

LearnLib / automatalib / 6999059674

27 Nov 2023 12:33AM UTC coverage: 89.871% (-0.006%) from 89.877%
6999059674

push

github

mtf90
ci: add jaxb to plugin via dependency

15696 of 17465 relevant lines covered (89.87%)

1.67 hits per line

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

25.0
/api/src/main/java/net/automatalib/automaton/transducer/probabilistic/ProbabilisticOutput.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.automaton.transducer.probabilistic;
17

18
import java.util.Objects;
19

20
import org.checkerframework.checker.nullness.qual.Nullable;
21

22
public final class ProbabilisticOutput<O> {
23

24
    private final float probability;
25
    private final O output;
26

27
    public ProbabilisticOutput(float probability, O output) {
1✔
28
        this.probability = probability;
1✔
29
        this.output = output;
1✔
30
    }
1✔
31

32
    public float getProbability() {
33
        return probability;
×
34
    }
35

36
    public O getOutput() {
37
        return output;
×
38
    }
39

40
    @Override
41
    public boolean equals(@Nullable Object o) {
42
        if (this == o) {
×
43
            return true;
×
44
        }
45
        if (!(o instanceof ProbabilisticOutput)) {
×
46
            return false;
×
47
        }
48

49
        final ProbabilisticOutput<?> that = (ProbabilisticOutput<?>) o;
×
50
        return Float.compare(probability, that.probability) == 0 && Objects.equals(output, that.output);
×
51
    }
52

53
    @Override
54
    public int hashCode() {
55
        int result = 1;
×
56
        result = 31 * result + Float.hashCode(probability);
×
57
        result = 31 * result + Objects.hashCode(output);
×
58
        return result;
×
59
    }
60
}
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