com.hp.hpl.jena.query.Query.equals()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.hp.hpl.jena.query.Query.equals方法的一些代码示例,展示了Query.equals的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.equals方法的具体详情如下:
包路径:com.hp.hpl.jena.query.Query
类名称:Query
方法名:equals

Query.equals介绍

[英]Are two queries equals - tests shape and details. Equality means that the queries do the same thing, including same variables, in the same places. Being unequals does not mean the queries do different things. For example, reordering a group or union means that that a query is different. Two instances of a query parsed from the same string are equal.
[中]两个查询相等——测试形状和细节。相等意味着查询在相同的位置执行相同的操作,包括相同的变量。不平等并不意味着查询会做不同的事情。例如,对组或联合重新排序意味着查询是不同的。从同一字符串解析的查询的两个实例相等。

代码示例

代码示例来源:origin: com.hp.hpl.jena/arq

@Override
public boolean equalTo(Element other, NodeIsomorphismMap isoMap)
{
  if ( ! ( other instanceof ElementSubQuery) )
    return false ;
  ElementSubQuery el = (ElementSubQuery)other ;
  return query.equals(el.query) ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public boolean equalTo(Element other, NodeIsomorphismMap isoMap)
{
  if ( ! ( other instanceof ElementSubQuery) )
    return false ;
  ElementSubQuery el = (ElementSubQuery)other ;
  return query.equals(el.query) ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

throw new QueryCheckException("reparsed query hashCode does not equal parsed input query") ;
if ( ! query.equals(query2) ) 
  throw new QueryCheckException("reparsed output does not equal parsed input") ;

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

throw new QueryCheckException("reparsed query hashCode does not equal parsed input query \nQuery (hashCode: " + query.hashCode() + ")=\n" + query + "\n\nQuery2 (hashCode: " + query2.hashCode() + ")=\n" + query2) ;
if ( ! query.equals(query2) ) 
  throw new QueryCheckException("reparsed output does not equal parsed input") ;

相关文章