|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.webtest.framework.core.query.Queries
public final class Queries
Factory of useful TimedQuery
implementations.
Nested Class Summary | |
---|---|
static class |
Queries.ConditionalQueryForQuery<V>
|
static class |
Queries.ConditionalQueryForValue<V>
|
static class |
Queries.ForQueryBuilder<V>
|
static class |
Queries.ForValueBuilder<V>
|
Method Summary | ||
---|---|---|
static
|
conditionalQuery(TimedQuery<T> query,
TimedCondition condition)
Create new TimedQuery instance that will evaluate to the value provided by query and only return, if the provided condition evaluates to true . |
|
static
|
conditionalQuery(T value,
TimedCondition condition)
Return a builder that will create new TimedQuery instance that will evaluate to the provided value and only return, if the provided condition evaluates to true . |
|
static
|
transform(TimedQuery<T> original,
Function<T,U> transformer)
Transform original query into a new timed query that has the same timing semantics (conditions of return, default timeout, wait interval etc.), but returns value of new type transformed from the original by the transformer function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Queries.ForValueBuilder<T> conditionalQuery(T value, TimedCondition condition)
Return a builder that will create new TimedQuery instance that will evaluate to the provided value
and only return, if the provided condition evaluates to true
. The timeout characteristics
of the returned query will be the same as in condition, and may be customized by modifying the builder.
A default ExpirationHandler
instance provided to handle the case of expired query will be
ExpirationHandler.RETURN_NULL
. Custom handlers may be provided to the builder if necessary.
T
- type of the query resultvalue
- value of the target querycondition
- underlying condition
public static <T> Queries.ForQueryBuilder<T> conditionalQuery(TimedQuery<T> query, TimedCondition condition)
Create new TimedQuery instance that will evaluate to the value provided by query and only return,
if the provided condition evaluates to true
. The timeout characteristics of the
returned query will be the same as in query, and may be customized by modifying the builder.
A default ExpirationHandler
instance provided to handle the case of expired query will be
ExpirationHandler.RETURN_NULL
. Custom handlers may be provided to the builder if necessary.
T
- type of the query resultquery
- underlying querycondition
- underlying condition
public static <T,U> TimedQuery<U> transform(TimedQuery<T> original, Function<T,U> transformer)
T
- original query result typeU
- target query result typeoriginal
- original querytransformer
- function transforming results of the query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |