Class OBinaryComparatorV0
java.lang.Object
com.orientechnologies.orient.core.serialization.serializer.record.binary.OBinaryComparatorV0
- All Implemented Interfaces:
OBinaryComparator
Implementation v0 of comparator based on protocol v0.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(OBinaryField iField1, OBinaryField iField2) Compares two values executing also conversion between types.booleanisBinaryComparable(OType iType) Returns true if the type is binary comparablebooleanisEqual(OBinaryField iField1, OBinaryField iField2) Compares if 2 field values are the same.
-
Constructor Details
-
OBinaryComparatorV0
public OBinaryComparatorV0()
-
-
Method Details
-
isBinaryComparable
Description copied from interface:OBinaryComparatorReturns true if the type is binary comparable- Specified by:
isBinaryComparablein interfaceOBinaryComparator- Parameters:
iType-- Returns:
-
isEqual
Compares if 2 field values are the same.- Specified by:
isEqualin interfaceOBinaryComparator- Parameters:
iField1- First value to compareiField2- Second value to compare- Returns:
- true if they match, otherwise false
-
compare
Compares two values executing also conversion between types.- Specified by:
comparein interfaceOBinaryComparator- Parameters:
iField1- First value to compareiField2- Second value to compare- Returns:
- 0 if they matches, >0 if first value is major than second, invalid input: '<'0 in case is minor
-