Package org.fluentlenium.core.conditions
Class StringConditionsImpl
- java.lang.Object
-
- org.fluentlenium.core.conditions.AbstractObjectConditions<java.lang.String>
-
- org.fluentlenium.core.conditions.StringConditionsImpl
-
- All Implemented Interfaces:
Conditions<java.lang.String>,ConditionsObject<java.lang.String>,StringConditions
public class StringConditionsImpl extends AbstractObjectConditions<java.lang.String> implements StringConditions
Conditions for string
-
-
Field Summary
-
Fields inherited from class org.fluentlenium.core.conditions.AbstractObjectConditions
negation, object
-
-
Constructor Summary
Constructors Constructor Description StringConditionsImpl(java.lang.String string)Creates a new conditions object on string.StringConditionsImpl(java.lang.String string, boolean negation)Creates a new conditions object on string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(java.lang.CharSequence charSequence)Check that this contains the given sequence of characters.booleanendsWith(java.lang.String suffix)Check that this ends with the given string.booleanequalTo(java.lang.String anotherString)Check that this is equal to with the given string.booleanequalToIgnoreCase(java.lang.String anotherString)Check that this is equal to with the given string, ignoring case.booleanmatches(java.lang.String regex)Check that this matches the given regular expression string.booleanmatches(java.util.regex.Pattern pattern)Check that this matches the given regular expression pattern.protected StringConditionsImplnewInstance(boolean negationValue)Creates a new instance of this condition.StringConditionsImplnot()Negates this condition object.booleanstartsWith(java.lang.String prefix)Check that this starts with the given string.-
Methods inherited from class org.fluentlenium.core.conditions.AbstractObjectConditions
getActualObject, verify
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fluentlenium.core.conditions.Conditions
verify
-
-
-
-
Constructor Detail
-
StringConditionsImpl
public StringConditionsImpl(java.lang.String string)
Creates a new conditions object on string.- Parameters:
string- underlying string
-
StringConditionsImpl
public StringConditionsImpl(java.lang.String string, boolean negation)Creates a new conditions object on string.- Parameters:
string- underlying stringnegation- negation value
-
-
Method Detail
-
newInstance
protected StringConditionsImpl newInstance(boolean negationValue)
Description copied from class:AbstractObjectConditionsCreates a new instance of this condition.- Specified by:
newInstancein classAbstractObjectConditions<java.lang.String>- Parameters:
negationValue- negation value- Returns:
- new instance of this condition
-
not
public StringConditionsImpl not()
Description copied from interface:ConditionsNegates this condition object.- Specified by:
notin interfaceConditions<java.lang.String>- Specified by:
notin interfaceStringConditions- Overrides:
notin classAbstractObjectConditions<java.lang.String>- Returns:
- a negated condition object
-
contains
public boolean contains(java.lang.CharSequence charSequence)
Description copied from interface:StringConditionsCheck that this contains the given sequence of characters.- Specified by:
containsin interfaceStringConditions- Parameters:
charSequence- sequence of characters- Returns:
- true if it contains the given sequence of characters, false otherwise
-
startsWith
public boolean startsWith(java.lang.String prefix)
Description copied from interface:StringConditionsCheck that this starts with the given string.- Specified by:
startsWithin interfaceStringConditions- Parameters:
prefix- string- Returns:
- true if it starts with the given string, false otherwise
-
endsWith
public boolean endsWith(java.lang.String suffix)
Description copied from interface:StringConditionsCheck that this ends with the given string.- Specified by:
endsWithin interfaceStringConditions- Parameters:
suffix- string- Returns:
- true if it ends with the given string, false otherwise
-
equalTo
public boolean equalTo(java.lang.String anotherString)
Description copied from interface:StringConditionsCheck that this is equal to with the given string.- Specified by:
equalToin interfaceStringConditions- Parameters:
anotherString- another string- Returns:
- true if it is equal to the given string, false otherwise
-
equalToIgnoreCase
public boolean equalToIgnoreCase(java.lang.String anotherString)
Description copied from interface:StringConditionsCheck that this is equal to with the given string, ignoring case.- Specified by:
equalToIgnoreCasein interfaceStringConditions- Parameters:
anotherString- another string- Returns:
- true if it is equal to the given string, ignoring case, false otherwise
-
matches
public boolean matches(java.lang.String regex)
Description copied from interface:StringConditionsCheck that this matches the given regular expression string.- Specified by:
matchesin interfaceStringConditions- Parameters:
regex- regular expression string- Returns:
- true if it matches the given regular expression string, false otherwise
-
matches
public boolean matches(java.util.regex.Pattern pattern)
Description copied from interface:StringConditionsCheck that this matches the given regular expression pattern.- Specified by:
matchesin interfaceStringConditions- Parameters:
pattern- regular expression pattern- Returns:
- true if it matches the given regular expression pattern, false otherwise
-
-