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

LearnLib / learnlib / 6673301747

27 Oct 2023 11:46PM UTC coverage: 91.986% (-1.3%) from 93.327%
6673301747

push

github

mtf90
merge the release and sign-artifacts profiles

10984 of 11941 relevant lines covered (91.99%)

1.72 hits per line

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

66.67
/drivers/basic/src/main/java/de/learnlib/driver/reflect/ReturnValue.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.driver.reflect;
17

18
import java.util.Objects;
19

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

22
/**
23
 * A (non-empty) output of a method call.
24
 *
25
 * @param <T>
26
 *         return value type
27
 */
28
public final class ReturnValue<T> extends MethodOutput {
29

30
    private final T ret;
31

32
    public ReturnValue(T ret) {
2✔
33
        this.ret = ret;
2✔
34
    }
2✔
35

36
    @Override
37
    public int hashCode() {
38
        return Objects.hashCode(this.ret);
×
39
    }
40

41
    @Override
42
    public boolean equals(@Nullable Object obj) {
43
        if (this == obj) {
2✔
44
            return true;
×
45
        }
46
        if (!(obj instanceof ReturnValue)) {
2✔
47
            return false;
×
48
        }
49

50
        final ReturnValue<?> other = (ReturnValue<?>) obj;
2✔
51
        return Objects.equals(this.ret, other.ret);
2✔
52
    }
53

54
    @Override
55
    public String toString() {
56
        return Objects.toString(this.ret);
1✔
57
    }
58

59
    public T getValue() {
60
        return ret;
×
61
    }
62

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