T
- the type of Component
this reader supports.public abstract class TextReader<T extends Component> extends Object
Component
.Constructor and Description |
---|
TextReader() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkContainsText(T component,
String text)
Indicates whether the given AWT or Swing
Component contains or displays the given text. |
boolean |
containsText(Component c,
String text)
Indicates whether the given AWT or Swing
Component contains or displays the given text. |
abstract Class<T> |
supportedComponent() |
@Nonnull public abstract Class<T> supportedComponent()
Component
this reader supports.@RunsInCurrentThread public final boolean containsText(@Nonnull Component c, @Nonnull String text)
Component
contains or displays the given text.c
- the given Component
.text
- the given text.true
if the given Component
contains or displays the given text; false
otherwise.IllegalArgumentException
- if this reader does not support the type of the given Component
(e.g. this
reader supports JButton
s and a JLabel
is passed).supportedComponent()
@RunsInCurrentThread protected abstract boolean checkContainsText(@Nonnull T component, @Nonnull String text)
Component
contains or displays the given text. Implementations
must ensure that they are executed in the current thread.component
- the given Component
.text
- the given text.true
if the given Component
contains or displays the given text; false
otherwise.Copyright © 2014–2019 AssertJ. All rights reserved.