@Test public void test() { byte[] lowerInclusiveKey = keyRange.getLowerRange(); if (!keyRange.isLowerInclusive() && !Bytes.equals(lowerInclusiveKey, KeyRange.UNBOUND)) { lowerInclusiveKey = ByteUtil.nextKey(lowerInclusiveKey); } byte[] upperExclusiveKey = keyRange.getUpperRange(); if (keyRange.isUpperInclusive()) { upperExclusiveKey = ByteUtil.nextKey(upperExclusiveKey); } assertEquals(expectedResult, scanRanges.intersect(lowerInclusiveKey,upperExclusiveKey)); }
public boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { if (isEverything()) { return true; } if (isDegenerate()) { return false; } return filter.hasIntersect(lowerInclusiveKey, upperExclusiveKey); }
ScanRanges { public boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { if (isEverything()) { return true; } if (isDegenerate()) { return false; } return filter.hasIntersect(lowerInclusiveKey, upperExclusiveKey); } }
ScanRanges { public boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { if (isEverything()) { return true; } if (isDegenerate()) { return false; } return filter.hasIntersect(lowerInclusiveKey, upperExclusiveKey); } private  ScanRanges(List<List<KeyRange>> ranges, RowKeySchema schema, boolean forceRangeScan); }
ScanRanges { public boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { if (isEverything()) { return true; } if (isDegenerate()) { return false; } return filter.hasIntersect(lowerInclusiveKey, upperExclusiveKey); } private  ScanRanges(List<List<KeyRange>> ranges, RowKeySchema schema, boolean forceRangeScan); static ScanRanges create(List<List<KeyRange>> ranges, RowKeySchema schema); static ScanRanges create(List<List<KeyRange>> ranges, RowKeySchema schema, boolean forceRangeScan); SkipScanFilter getSkipScanFilter(); List<List<KeyRange>> getRanges(); RowKeySchema getSchema(); boolean isEverything(); boolean isDegenerate(); boolean useSkipScanFilter(); boolean isSingleRowScan(); void setScanStartStopRow(Scan scan); boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey); @Override String toString(); }
ScanRanges { public boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey) { if (isEverything()) { return true; } if (isDegenerate()) { return false; } return filter.hasIntersect(lowerInclusiveKey, upperExclusiveKey); } private  ScanRanges(List<List<KeyRange>> ranges, RowKeySchema schema, boolean forceRangeScan); static ScanRanges create(List<List<KeyRange>> ranges, RowKeySchema schema); static ScanRanges create(List<List<KeyRange>> ranges, RowKeySchema schema, boolean forceRangeScan); SkipScanFilter getSkipScanFilter(); List<List<KeyRange>> getRanges(); RowKeySchema getSchema(); boolean isEverything(); boolean isDegenerate(); boolean useSkipScanFilter(); boolean isSingleRowScan(); void setScanStartStopRow(Scan scan); boolean intersect(byte[] lowerInclusiveKey, byte[] upperExclusiveKey); @Override String toString(); static final ScanRanges EVERYTHING; static final ScanRanges NOTHING; static final ImmutableBytesWritable UNBOUND; }