org.specrunner.comparators.core
Class ComparatorString
java.lang.Object
org.specrunner.comparators.core.ComparatorDefault
org.specrunner.comparators.core.ComparatorString
- All Implemented Interfaces:
- Serializable, Comparator<Object>, IComparator, IResetable
- Direct Known Subclasses:
- ComparatorClob, ComparatorStringNormalized, ComparatorStringTrim
public class ComparatorString
- extends ComparatorDefault
A string comparator using equals.
- Author:
- Thiago Santos.
- See Also:
- Serialized Form
|
Method Summary |
Class<?> |
getType()
The comparator reference type. |
boolean |
match(Object expected,
Object received)
Says if two objects can be considered equals. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComparatorString
public ComparatorString()
getType
public Class<?> getType()
- Description copied from interface:
IComparator
- The comparator reference type.
- Specified by:
getType in interface IComparator- Overrides:
getType in class ComparatorDefault
- Returns:
- The comparator target.
match
public boolean match(Object expected,
Object received)
- Description copied from interface:
IComparator
- Says if two objects can be considered equals.
- Specified by:
match in interface IComparator- Overrides:
match in class ComparatorDefault
- Parameters:
expected - The expected value.received - The received value.
- Returns:
- true, if they are equal, false, otherwise.
Copyright © 2014. All rights reserved.