@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Index)) { return false; } Index otherIndex = (Index) other; return this.abstractLabel.equals(otherIndex.abstractLabel) && this.name.equals(otherIndex.name); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Index)) { return false; } Index otherIndex = (Index) other; return this.abstractLabel.equals(otherIndex.abstractLabel) && this.name.equals(otherIndex.name); }
@Override public boolean equals(Object other) { if (!super.equals(other)) { return false; } if (!(other instanceof EdgeLabel)) { return false; } EdgeLabel otherEdgeLabel = (EdgeLabel) other; if (isValid()) { if (this.getSchema().getTopology().isSqlWriteLockHeldByCurrentThread() && !this.uncommittedInVertexLabels.isEmpty()) { VertexLabel vertexLabel = this.uncommittedOutVertexLabels.iterator().next(); VertexLabel otherVertexLabel = otherEdgeLabel.uncommittedOutVertexLabels.iterator().next(); return vertexLabel.getSchema().equals(otherVertexLabel.getSchema()) && otherEdgeLabel.getLabel().equals(this.getLabel()); } else { VertexLabel vertexLabel = this.outVertexLabels.iterator().next(); VertexLabel otherVertexLabel = otherEdgeLabel.outVertexLabels.iterator().next(); return vertexLabel.getSchema().equals(otherVertexLabel.getSchema()) && otherEdgeLabel.getLabel().equals(this.getLabel()); } } return otherEdgeLabel.getLabel().equals(this.getLabel()); }
@Override public boolean equals(Object other) { if (!super.equals(other)) { return false; } if (!(other instanceof EdgeLabel)) { return false; } EdgeLabel otherEdgeLabel = (EdgeLabel) other; if (isValid()) { if (this.getSchema().getTopology().isSqlWriteLockHeldByCurrentThread() && !this.uncommittedInVertexLabels.isEmpty()) { VertexLabel vertexLabel = this.uncommittedOutVertexLabels.iterator().next(); VertexLabel otherVertexLabel = otherEdgeLabel.uncommittedOutVertexLabels.iterator().next(); return vertexLabel.getSchema().equals(otherVertexLabel.getSchema()) && otherEdgeLabel.getLabel().equals(this.getLabel()); } else { VertexLabel vertexLabel = this.outVertexLabels.iterator().next(); VertexLabel otherVertexLabel = otherEdgeLabel.outVertexLabels.iterator().next(); return vertexLabel.getSchema().equals(otherVertexLabel.getSchema()) && otherEdgeLabel.getLabel().equals(this.getLabel()); } } return otherEdgeLabel.getLabel().equals(this.getLabel()); }