Interface OBinaryComparator
- All Known Implementing Classes:
OBinaryComparatorV0
public interface OBinaryComparator
Compares types at binary level: super fast, using of literals as much as it can.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Method Summary
Modifier and TypeMethodDescriptionintcompare(OBinaryField iValue1, OBinaryField iValue2) Compares two binary values executing also conversion between types.booleanisBinaryComparable(OType iType) Returns true if the type is binary comparablebooleanisEqual(OBinaryField iFirstValue, OBinaryField iSecondValue) Compares if two binary values are the same.
-
Method Details
-
isEqual
Compares if two binary values are the same.- Parameters:
iFirstValue- First value to compareiSecondValue- Second value to compare- Returns:
- true if they match, otherwise false
-
compare
Compares two binary values executing also conversion between types.- Parameters:
iValue1- First value to compareiValue2- Second value to compare- Returns:
- 0 if they matches, >0 if first value is major than second, invalid input: '<'0 in case is minor
-
isBinaryComparable
Returns true if the type is binary comparable- Parameters:
iType-- Returns:
-