org.specrunner.comparators.core
Class ComparatorNode
java.lang.Object
org.specrunner.comparators.core.ComparatorDefault
org.specrunner.comparators.core.ComparatorNode
- All Implemented Interfaces:
- Serializable, Comparator<Object>, IComparator, IResetable
public class ComparatorNode
- extends ComparatorDefault
A default node comparator. Compare each node: text-by-text and attribute by
attribute.
- Author:
- Thiago Santos.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComparatorNode
public ComparatorNode()
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.
toString
protected String toString(Object obj)
- Description copied from class:
ComparatorDefault
- Convert object to String.
- Overrides:
toString in class ComparatorDefault
- Parameters:
obj - An object.
- Returns:
- A string for that object.
Copyright © 2014. All rights reserved.