public abstract class AbstractQuery<I,D> extends Query<I,D>
Modifier and Type | Field and Description |
---|---|
protected Word<I> |
prefix |
protected Word<I> |
suffix |
Constructor and Description |
---|
AbstractQuery(Query<I,?> query) |
AbstractQuery(Word<I> queryWord) |
AbstractQuery(Word<I> prefix,
Word<I> suffix) |
Modifier and Type | Method and 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.
|
public Word<I> getPrefix()
Query
public Word<I> getSuffix()
Query
public String toStringWithAnswer(D answer)
AbstractQuery
for their toString method to ensure output consistency."Query[<prefix>|<suffix> / <answer>]"
. If the query has not been answered
yet, <answer>
will be null.Copyright © 2020. All rights reserved.