@ParametersAreNonnullByDefault public interface MembershipOracle<I,D> extends QueryAnswerer<I,D>
queries
: A query is a sequence
of input symbols (divided into a prefix and a suffix part, cf. Query.getPrefix()
and Query.getSuffix()
, in reaction to which the SUL produces a specific observable
behavior (outputting a word, acceptance/rejection etc.).DefaultQuery
Modifier and Type | Interface and Description |
---|---|
static interface |
MembershipOracle.DFAMembershipOracle<I> |
static interface |
MembershipOracle.MealyMembershipOracle<I,O> |
Modifier and Type | Method and Description |
---|---|
default D |
answerQuery(Word<I> input) |
default D |
answerQuery(Word<I> prefix,
Word<I> suffix) |
default MembershipOracle<I,D> |
asOracle() |
void |
processQueries(Collection<? extends Query<I,D>> queries)
Processes the specified collection of queries.
|
default void |
processQuery(Query<I,D> query)
Processes a single query.
|
void processQueries(Collection<? extends Query<I,D>> queries)
Query.answer(Object)
method should have
been called with an argument reflecting the SUL response to the respective query.queries
- the queries to processQuery.answer(Object)
default void processQuery(Query<I,D> query)
Query.answer(Object)
method of the supplied object will have been called with an argument reflecting
the SUL response to the respective query.
The default implementation of this method will simply wrap the provided Query
in a singleton Collection
using Collections.singleton(Object)
.
Implementations in subclasses should override this method to circumvent the Collection
object creation, if possible.
query
- the query to processdefault D answerQuery(Word<I> input)
answerQuery
in interface QueryAnswerer<I,D>
default D answerQuery(Word<I> prefix, Word<I> suffix)
answerQuery
in interface QueryAnswerer<I,D>
default MembershipOracle<I,D> asOracle()
asOracle
in interface QueryAnswerer<I,D>
Copyright © 2015. All rights reserved.