hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java
private boolean compare(ByteDataBuffer serializedRepresentation, long key) {
        long position = key & POINTER_MASK;

        int sizeOfData = VarInt.readVInt(byteData.getUnderlyingArray(), position);

        if (sizeOfData != serializedRepresentation.length()) {
            return false;
        }

        position += VarInt.sizeOfVInt(sizeOfData);

        for (int i = 0; i < sizeOfData; i++) {
            if (serializedRepresentation.get(i) != byteData.get(position++)) {
                return false;
            }
        }

        return true;
    }
private boolean compare(ByteDataBuffer serializedRepresentation, long key) {
        long position = key & POINTER_MASK;

        int sizeOfData = VarInt.readVInt(byteData.getUnderlyingArray(), position);

        if (sizeOfData != serializedRepresentation.length()) {
            return false;
        }

        position += VarInt.sizeOfVInt(sizeOfData);

        for (int i = 0; i < sizeOfData; i++) {
            if (serializedRepresentation.get(i) != byteData.get(position++)) {
                return false;
            }
        }

        return true;
    }
private boolean compare ( ByteDataBuffer serializedRepresentation , long key ) { long position = key & POINTER_MASK ; int sizeOfData = VarInt . readVInt ( byteData . getUnderlyingArray ( ) , position ) ; if ( sizeOfData != serializedRepresentation . length ( ) ) { return false ; } position += VarInt . sizeOfVInt ( sizeOfData ) ; for ( int i = 0 ; i < sizeOfData ; i ++ ) { if ( serializedRepresentation . get ( i ) != byteData . get ( position ++ ) ) { return false ; } } return true ; }
Compare the byte sequence contained in the supplied ByteDataBuffer with the
sequence contained in the map pointed to by the specified key, byte by byte.
Compare the byte sequence contained in the supplied ByteDataBuffer with the sequence contained in the map pointed to by the specified key byte by byte .