Package de.learnlib.query
Class AbstractQuery<I,D>
- java.lang.Object
-
- de.learnlib.query.Query<I,D>
-
- de.learnlib.query.AbstractQuery<I,D>
-
- Direct Known Subclasses:
DefaultQuery
public abstract class AbstractQuery<I,D> extends Query<I,D>
-
-
Constructor Summary
Constructors Constructor Description AbstractQuery(Query<I,?> query)
AbstractQuery(Word<I> queryWord)
AbstractQuery(Word<I> prefix, Word<I> suffix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Word<I>
getPrefix()
Returns the prefix part of this query.Word<I>
getSuffix()
Returns the suffix part of this query.String
toStringWithAnswer(D answer)
Returns the string representation of this query, including a possible answer.
-
-
-
Method Detail
-
getPrefix
public Word<I> getPrefix()
Description copied from class:Query
Returns the prefix part of this query. The prefix of a query is responsible for transferring the system into a certain state, but (apart from that) does not directly influence the output.
-
getSuffix
public Word<I> getSuffix()
Description copied from class:Query
Returns the suffix part of this query. The suffix of a query is the experiment performed on the system when in the state it was transferred into by the prefix, and thus directly influences the output.
-
toStringWithAnswer
public String toStringWithAnswer(D answer)
Returns the string representation of this query, including a possible answer. This method should be used by classes extendingAbstractQuery
for their toString method to ensure output consistency.- Returns:
- A string of the form
"Query[<prefix>|<suffix> / <answer>]"
. If the query has not been answered yet,<answer>
will be null.
-
-