• 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

90.0
/oracles/filters/cache/src/main/java/de/learnlib/filter/cache/dfa/ProxyQuery.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.cache.dfa;
17

18
import de.learnlib.api.query.Query;
19
import net.automatalib.words.Word;
20

21
/**
22
 * Proxy query. Answers an underlying query, and also stores the result.
23
 *
24
 * @param <I>
25
 *         input symbol class
26
 */
27
final class ProxyQuery<I> extends Query<I, Boolean> {
28

29
    private final Query<I, Boolean> origQuery;
30
    private Boolean answer;
31

32
    /**
33
     * Constructor.
34
     *
35
     * @param origQuery
36
     *         the original query to forward the answer to
37
     */
38
    ProxyQuery(Query<I, Boolean> origQuery) {
2✔
39
        this.origQuery = origQuery;
2✔
40
    }
2✔
41

42
    @Override
43
    public void answer(Boolean output) {
44
        origQuery.answer(output);
2✔
45
        this.answer = output;
2✔
46
    }
2✔
47

48
    @Override
49
    public Word<I> getPrefix() {
50
        return origQuery.getPrefix();
2✔
51
    }
52

53
    @Override
54
    public Word<I> getSuffix() {
55
        return origQuery.getSuffix();
2✔
56
    }
57

58
    @Override
59
    public String toString() {
60
        return origQuery.toString();
×
61
    }
62

63
    /**
64
     * Retrieves the answer that this oracle received.
65
     *
66
     * @return the answer that was received
67
     */
68
    public Boolean getAnswer() {
69
        return answer;
2✔
70
    }
71

72
}
73

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