@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]); }
@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; }
@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; }
@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]); }
@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; }
/** * * @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()); }
/** * * @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()); }