Java Code Examples for org.apache.lucene.util.ArrayUtil#equals()

The following examples show how to use org.apache.lucene.util.ArrayUtil#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingFamily(Cell keyValue, byte[] family) {
    return !(family == null || keyValue == null || family.length != keyValue.getFamilyLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getFamilyOffset(), family, 0,
                             keyValue.getFamilyLength());
}
 
Example 2
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingQualifier(Cell keyValue, byte[] qualifier) {
    return !(qualifier == null || keyValue == null || qualifier.length != keyValue.getQualifierLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getQualifierOffset(), qualifier, 0, keyValue.getQualifierLength());
}
 
Example 3
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingValue(Cell keyValue, byte[] value) {
    return !(value == null || keyValue == null || value.length != keyValue.getValueLength()) && ArrayUtil.equals
            (CellUtils.getBuffer(keyValue), keyValue.getValueOffset(), value, 0, keyValue.getValueLength());
}
 
Example 4
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingFamilyKeyValue(Cell keyValue, Cell other) {
    return !(keyValue == null || other == null || keyValue.getFamilyLength() != other.getFamilyLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getFamilyOffset(),
                             CellUtils.getBuffer(other), other.getFamilyOffset(), other.getFamilyLength());
}
 
Example 5
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingQualifierKeyValue(Cell keyValue, Cell other) {
    return !(keyValue == null || other == null || keyValue.getQualifierLength() != other.getQualifierLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getQualifierOffset(),
                             CellUtils.getBuffer(other), other.getQualifierOffset(), other.getQualifierLength());
}
 
Example 6
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingRowKeyValue(Cell keyValue, Cell other) {
    return !(keyValue == null || other == null || keyValue.getRowLength() != other.getRowLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getRowOffset(), CellUtils.getBuffer(other),
                             other.getRowOffset(), other.getRowLength());
}
 
Example 7
Source File: CellByteBufferArrayUtils.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
public static boolean matchingValueKeyValue(Cell keyValue, Cell other) {
    return !(keyValue == null || other == null || keyValue.getValueLength() != other.getValueLength()) &&
            ArrayUtil.equals(CellUtils.getBuffer(keyValue), keyValue.getValueOffset(),
                             CellUtils.getBuffer(other), other.getValueOffset(), other.getValueLength());
}