Package org.fluentlenium.core.conditions
Class AbstractObjectConditions<T>
- java.lang.Object
-
- org.fluentlenium.core.conditions.AbstractObjectConditions<T>
-
- Type Parameters:
T
- type of condition
- All Implemented Interfaces:
Conditions<T>
,ConditionsObject<T>
- Direct Known Subclasses:
DynamicIntegerConditionsImpl
,IntegerConditionsImpl
,RectangleConditionsImpl
,StringConditionsImpl
,WebElementConditions
public abstract class AbstractObjectConditions<T> extends java.lang.Object implements Conditions<T>, ConditionsObject<T>
Abstract implementation supported negation and instantiation.
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectConditions(T object)
Initialize the conditions with given object.AbstractObjectConditions(T object, boolean negation)
Initialize the conditions with given object
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
getActualObject()
Get the actual object.protected abstract AbstractObjectConditions<T>
newInstance(boolean negationValue)
Creates a new instance of this condition.AbstractObjectConditions<T>
not()
Negates this condition object.boolean
verify(java.util.function.Predicate<T> predicate)
Check that the given predicate is verified against this condition object.
-
-
-
Field Detail
-
object
protected final T object
-
negation
protected boolean negation
-
-
Constructor Detail
-
AbstractObjectConditions
public AbstractObjectConditions(T object)
Initialize the conditions with given object.- Parameters:
object
- underlying object
-
AbstractObjectConditions
public AbstractObjectConditions(T object, boolean negation)
Initialize the conditions with given object- Parameters:
object
- underlying objectnegation
- negation value
-
-
Method Detail
-
verify
public boolean verify(java.util.function.Predicate<T> predicate)
Description copied from interface:Conditions
Check that the given predicate is verified against this condition object.- Specified by:
verify
in interfaceConditions<T>
- Parameters:
predicate
- predicate to check- Returns:
- true if the predicated is checked, false otherwise
-
getActualObject
public T getActualObject()
Description copied from interface:ConditionsObject
Get the actual object.- Specified by:
getActualObject
in interfaceConditionsObject<T>
- Returns:
- actual object on which conditions are performed.
-
newInstance
protected abstract AbstractObjectConditions<T> newInstance(boolean negationValue)
Creates a new instance of this condition.- Parameters:
negationValue
- negation value- Returns:
- new instance of this condition
-
not
public AbstractObjectConditions<T> not()
Description copied from interface:Conditions
Negates this condition object.- Specified by:
not
in interfaceConditions<T>
- Returns:
- a negated condition object
-
-