com.atlassian.jira.webtest.framework.core.query
Class StaticQuery<T>

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.core.AbstractPollingQuery
      extended by com.atlassian.jira.webtest.framework.core.query.AbstractTimedQuery<T>
          extended by com.atlassian.jira.webtest.framework.core.query.StaticQuery<T>
All Implemented Interfaces:
ClockAware, PollingQuery, TimedQuery<T>

public final class StaticQuery<T>
extends AbstractTimedQuery<T>
implements TimedQuery<T>

A TimedQuery that always immediately returns a pre-defined static value.

Since:
v4.3

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.core.AbstractPollingQuery
defaultTimeout, interval
 
Constructor Summary
StaticQuery(T value, long defTimeout, long interval)
           
 
Method Summary
protected  T currentValue()
          Current evaluation of the query.
protected  boolean shouldReturn(T currentEval)
          If the current evaluated query value should be returned.
 String toString()
           
 
Methods inherited from class com.atlassian.jira.webtest.framework.core.query.AbstractTimedQuery
by, by, byDefaultTimeout, clock, expirationHandler, now, resetLastRun
 
Methods inherited from class com.atlassian.jira.webtest.framework.core.AbstractPollingQuery
defaultTimeout, interval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.query.TimedQuery
by, by, byDefaultTimeout, now
 
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PollingQuery
defaultTimeout, interval
 

Constructor Detail

StaticQuery

public StaticQuery(T value,
                   long defTimeout,
                   long interval)
Method Detail

shouldReturn

protected boolean shouldReturn(T currentEval)
Description copied from class: AbstractTimedQuery
If the current evaluated query value should be returned.

Specified by:
shouldReturn in class AbstractTimedQuery<T>
Parameters:
currentEval - current query evaluation expires
Returns:
true, if the current query evaluation should be returned as a result of this timed query

currentValue

protected T currentValue()
Description copied from class: AbstractTimedQuery
Current evaluation of the query.

Specified by:
currentValue in class AbstractTimedQuery<T>
Returns:
current evaluation of the query

toString

public String toString()
Overrides:
toString in class AbstractTimedQuery<T>


Copyright © 2002-2013 Atlassian. All Rights Reserved.