本文整理了Java中org.apache.jena.atlas.lib.Bytes.compare()
方法的一些代码示例,展示了Bytes.compare()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.compare()
方法的具体详情如下:
包路径:org.apache.jena.atlas.lib.Bytes
类名称:Bytes
方法名:compare
[英]Compare two byte arrays which may be of different lengths
[中]比较可能具有不同长度的两个字节数组
代码示例来源:origin: apache/jena
public static int compareByKeyValue(Record record1, Record record2)
{
checkCompatible(record1, record2) ;
int x = Bytes.compare(record1.key, record2.key) ;
if ( x == 0 )
{
if ( record1.value != null )
x = Bytes.compare(record1.value, record2.value) ;
}
return x ;
}
代码示例来源:origin: apache/jena
public static int compareByKeyValue(Record record1, Record record2)
{
checkCompatible(record1, record2) ;
int x = Bytes.compare(record1.key, record2.key) ;
if ( x == 0 )
{
if ( record1.value != null )
x = Bytes.compare(record1.value, record2.value) ;
}
return x ;
}
代码示例来源:origin: org.seaborne.mantis/dboe-base
public static int compareByKeyValue(Record record1, Record record2)
{
checkCompatible(record1, record2) ;
int x = Bytes.compare(record1.key, record2.key) ;
if ( x == 0 )
{
if ( record1.value != null )
x = Bytes.compare(record1.value, record2.value) ;
}
return x ;
}
代码示例来源:origin: apache/jena
public static int compareByKey(Record record1, Record record2)
{
checkKeyCompatible(record1, record2) ;
return Bytes.compare(record1.key, record2.key) ;
}
代码示例来源:origin: apache/jena
public static int compareByKey(Record record1, Record record2)
{
checkKeyCompatible(record1, record2) ;
return Bytes.compare(record1.key, record2.key) ;
}
代码示例来源:origin: org.seaborne.mantis/dboe-base
public static int compareByKey(Record record1, Record record2)
{
checkKeyCompatible(record1, record2) ;
return Bytes.compare(record1.key, record2.key) ;
}
代码示例来源:origin: apache/jena
@Override
public boolean contains(Record record)
{
Record r = find(record) ;
if ( r == null )
return false ;
if ( ! recordFactory.hasValue() )
return true ;
return Bytes.compare(record.getValue(), r.getValue()) == 0 ;
}
代码示例来源:origin: apache/jena
@Override
public boolean contains(Record record)
{
Record r = find(record) ;
if ( r == null )
return false ;
if ( ! recordFactory.hasValue() )
return true ;
return Bytes.compare(record.getValue(), r.getValue()) == 0 ;
}
代码示例来源:origin: org.apache.jena/jena-dboe-index
@Override
public boolean contains(Record record)
{
Record r = find(record) ;
if ( r == null )
return false ;
if ( ! recordFactory.hasValue() )
return true ;
return Bytes.compare(record.getValue(), r.getValue()) == 0 ;
}
代码示例来源:origin: org.seaborne.mantis/dboe-trans-data
@Override
public boolean contains(Record record) {
Record r = find(record) ;
if ( r == null )
return false ;
if ( !recordFactory.hasValue() )
return true ;
return Bytes.compare(record.getValue(), r.getValue()) == 0 ;
}
代码示例来源:origin: apache/jena
@Override
public boolean hasNext()
{
if ( slot != null )
return true ;
if ( nextIdx < 0 )
return false ;
if ( nextIdx >= rBuff.size() )
{
finish() ;
return false ;
}
slot = rBuff.access(nextIdx, keySlot, mapper);
if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 )
{
// Finished - now to large
finish() ;
return false ;
}
nextIdx ++ ;
return true ;
}
代码示例来源:origin: apache/jena
private static void compare(int expected, byte[] b1, byte[] b2)
{
int x = Bytes.compare(b1, b2) ;
if ( x > 0 && expected > 0 ) return ;
if ( x == 0 && expected == 0 ) return ;
if ( x < 0 && expected < 0 ) return ;
fail("Does not compare: "+Bytes.asHex(b1)+" :: "+Bytes.asHex(b2)) ;
}
代码示例来源:origin: apache/jena
currentIdx++ ;
if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 ) {
close() ;
return false ;
代码示例来源:origin: org.seaborne.mantis/dboe-base
currentIdx++ ;
if ( maxRec != null && Bytes.compare(keySlot, maxRec.getKey()) >= 0 ) {
close() ;
return false ;
内容来源于网络,如有侵权,请联系作者删除!