org.apache.clerezza.commons.rdf.Graph.equals()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(106)

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

Graph.equals介绍

暂无

代码示例

代码示例来源:origin: org.apache.clerezza/rdf.utils

@Override
public boolean equals(Object obj) {
  if (!(obj.getClass().equals(getClass()))) {
    return false;
  }
  UnionGraph other = (UnionGraph) obj;
  Set<Graph> otherGraphs
      = new HashSet(Arrays.asList(other.baseTripleCollections));
  Set<Graph> thisGraphs
      = new HashSet(Arrays.asList(baseTripleCollections));
  return thisGraphs.equals(otherGraphs)
      && baseTripleCollections[0].equals(other.baseTripleCollections[0]);
}

代码示例来源:origin: apache/clerezza

@Override
public boolean equals(Object obj) {
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final RdfList other = (RdfList) obj;
  if (!other.firstList.equals(this.firstList)) {
    return false;
  }
  if (!other.tc.equals(this.tc)) {
    return false;
  }
  return true;
}

代码示例来源:origin: org.apache.clerezza/rdf.utils

@Override
public boolean equals(Object obj) {
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final RdfList other = (RdfList) obj;
  if (!other.firstList.equals(this.firstList)) {
    return false;
  }
  if (!other.tc.equals(this.tc)) {
    return false;
  }
  return true;
}

代码示例来源:origin: apache/clerezza

@Override
public boolean equals(Object obj) {
  if (!(obj.getClass().equals(getClass()))) {
    return false;
  }
  UnionGraph other = (UnionGraph) obj;
  Set<Graph> otherGraphs
      = new HashSet(Arrays.asList(other.baseTripleCollections));
  Set<Graph> thisGraphs
      = new HashSet(Arrays.asList(baseTripleCollections));
  return thisGraphs.equals(otherGraphs)
      && baseTripleCollections[0].equals(other.baseTripleCollections[0]);
}

代码示例来源:origin: org.apache.clerezza/rdf.jena.tdb.storage

@Override
public Set<IRI> getNames(ImmutableGraph graph) {
  //this could be done more efficiently with an index, could be done with
  //a MultiBidiMap (BidiMap allowing multiple keys for the same value)
  Set<IRI> result = new HashSet<IRI>();
  for (IRI name : listGraphs()) {
    if (getGraph(name).equals(graph)) {
      result.add(name);
    }
  }
  return result;
}

代码示例来源:origin: org.apache.clerezza/rdf.utils

/**
 *
 * @param obj
 * @return true if obj is an instance of the same class represening the same
 * node in the same graph, subclasses may have different identity criteria.
 */
@Override
public boolean equals(Object obj) {
  if (obj == null || !(obj.getClass().equals(getClass()))) {
    return false;
  }
  GraphNode other = (GraphNode) obj;
  return getNode().equals(other.getNode())
      && getGraph().equals(other.getGraph());
}

代码示例来源:origin: apache/clerezza

/**
 *
 * @param obj
 * @return true if obj is an instance of the same class represening the same
 * node in the same graph, subclasses may have different identity criteria.
 */
@Override
public boolean equals(Object obj) {
  if (obj == null || !(obj.getClass().equals(getClass()))) {
    return false;
  }
  GraphNode other = (GraphNode) obj;
  return getNode().equals(other.getNode())
      && getGraph().equals(other.getGraph());
}

相关文章