Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swtbot.swt.finder.waits
Class WaitForObjectCondition<T>

    java.lang.Object
      org.eclipse.swtbot.swt.finder.waits.DefaultCondition
          org.eclipse.swtbot.swt.finder.waits.WaitForObjectCondition<T>

All Implemented Interfaces:
  ICondition

Direct Known Subclasses:
  WaitForEditor, WaitForView

    public abstract class WaitForObjectCondition<T>

extends DefaultCondition

Waits for objects to appear until the matcher evaluates to true.

Version:
  $Id$
Author:
  Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
See Also:
  `Conditions`

Field Summary
`protected Matcher<T>` | `matcher` The matcher that is used to match widgets.

Fields inherited from class org.eclipse.swtbot.swt.finder.waits.DefaultCondition
`bot`

Constructor Summary
`WaitForObjectCondition(Matcher<T> matcher)` Waits until the matcher is true.

Method Summary
`protected abstract List<T>` | `findMatches()`
`T` | `get(int index)`
`List<T>` | `getAllMatches()`
`boolean` | `test()` Tests if the condition has been met.

Methods inherited from class org.eclipse.swtbot.swt.finder.waits.DefaultCondition
`init`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.swtbot.swt.finder.waits.ICondition
`getFailureMessage`

Field Detail

### matcher

    protected final Matcher<T> matcher

  The matcher that is used to match widgets.

Constructor Detail

### WaitForObjectCondition

    public WaitForObjectCondition(Matcher<T> matcher)

  Waits until the matcher is true.

  Parameters:
    `matcher` - the matcher.

Method Detail

### test

    public boolean test()
                 throws Exception

  Description copied from interface: `ICondition`
  Tests if the condition has been met.

  Returns:
    `true` if the condition is satisfied, `false` otherwise.
  Throws:
    `Exception` - if the test encounters an error while processing the check.

### findMatches

    protected abstract List<T> findMatches()

  Returns:
    the matches that subclasses that matched.

### getAllMatches

    public List<T> getAllMatches()

  Returns:
    all objects that matched the matcher.

### get

    public T get(int index)

  Parameters:
    `index` - the index of the object.
  Returns:
    the element at the specified index in the list of matched objects.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD