@Override public boolean equals(Object o) { if (!(o instanceof Path)) { return false; } Path that = (Path) o; return this.uri.equals(that.uri); }
/** {@inheritDoc} */ @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof HadoopFileBlock)) return false; HadoopFileBlock that = (HadoopFileBlock)o; return len == that.len && start == that.start && file.equals(that.file); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HttpPageBufferClient that = (HttpPageBufferClient) o; if (!location.equals(that.location)) { return false; } return true; }
boolean equals(ConnectionKey other) { return this == other || other != null && hashCode == other.hashCode && realUri.equals(other.realUri) && Objects.equals(sslContext, other.sslContext); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } URLDefinition that = (URLDefinition) o; return uri != null ? uri.equals(that.uri) : that.uri == null; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } URLDefinition that = (URLDefinition) o; return uri != null ? uri.equals(that.uri) : that.uri == null; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AmazonS3URI that = (AmazonS3URI) o; if (isPathStyle != that.isPathStyle) return false; if (!uri.equals(that.uri)) return false; if (bucket != null ? !bucket.equals(that.bucket) : that.bucket != null) return false; if (key != null ? !key.equals(that.key) : that.key != null) return false; if (versionId != null ? !versionId.equals(that.versionId) : that.versionId != null) return false; return region != null ? region.equals(that.region) : that.region == null; }
/** * Determine if this URIBuilder is equal to another URIBuilder instance. * * @return if <code>obj</code> is a URIBuilder instance whose underlying * URI implementation is equal to this one's. * @see URI#equals(Object) */ @Override public boolean equals(Object obj) { if (!(obj instanceof URIBuilder)) return false; return this.base.equals(((URIBuilder) obj).toURI()); }
@Override public boolean apply(InputFile f) { return uri.equals(f.uri()); }
void join(final AtomicReference<State> stateRef, final URI location, final SimpleTransactionControl control) throws IllegalStateException { if (! this.location.equals(location)) { throw Log.log.locationAlreadyInitialized(location, this.location); } multipleJoins = true; }
/** * Compares according to {@link #toURI}. * {@inheritDoc} */ @Override public final boolean equals(Object obj) { return obj instanceof VirtualFile && toURI().equals(((VirtualFile) obj).toURI()); }
public boolean equals(final URIName other) { try { return (new URI(name)).equals(new URI(other.getName())); } catch (URISyntaxException e) { throw log.asnInvalidGeneralNameForUriType(e); } }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof Link) { final Link otherLink = (Link) other; return uri.equals(otherLink.getUri()) && params.equals(otherLink.getParams()); } return false; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof Link) { final Link otherLink = (Link) other; return uri.equals(otherLink.getUri()) && params.equals(otherLink.getParams()); } return false; }
private void checkSlaveNodesChange(Collection<ClusterPartition> newPartitions) { Set<ClusterPartition> lastPartitions = getLastPartitions(); for (ClusterPartition newPart : newPartitions) { for (ClusterPartition currentPart : lastPartitions) { if (!newPart.getMasterAddress().equals(currentPart.getMasterAddress())) { continue; } MasterSlaveEntry entry = getEntry(currentPart.getSlots().iterator().next()); // should be invoked first in order to remove stale failedSlaveAddresses Set<URI> addedSlaves = addRemoveSlaves(entry, currentPart, newPart); // Do some slaves have changed state from failed to alive? upDownSlaves(entry, currentPart, newPart, addedSlaves); break; } } }
private void checkSlaveNodesChange(Collection<ClusterPartition> newPartitions) { Set<ClusterPartition> lastPartitions = getLastPartitions(); for (ClusterPartition newPart : newPartitions) { for (ClusterPartition currentPart : lastPartitions) { if (!newPart.getMasterAddress().equals(currentPart.getMasterAddress())) { continue; } MasterSlaveEntry entry = getEntry(currentPart.getSlots().iterator().next()); // should be invoked first in order to remove stale failedSlaveAddresses Set<URI> addedSlaves = addRemoveSlaves(entry, currentPart, newPart); // Do some slaves have changed state from failed to alive? upDownSlaves(entry, currentPart, newPart, addedSlaves); break; } } }
@Test public void temporaryRedirect() { URI location = URI.create("http://example.com"); Mono<ServerResponse> result = ServerResponse.temporaryRedirect(location).build(); StepVerifier.create(result) .expectNextMatches(response -> HttpStatus.TEMPORARY_REDIRECT.equals(response.statusCode()) && location.equals(response.headers().getLocation())) .expectComplete() .verify(); }
@Test public void permanentRedirect() { URI location = URI.create("http://example.com"); Mono<ServerResponse> result = ServerResponse.permanentRedirect(location).build(); StepVerifier.create(result) .expectNextMatches(response -> HttpStatus.PERMANENT_REDIRECT.equals(response.statusCode()) && location.equals(response.headers().getLocation())) .expectComplete() .verify(); }
@Test public void created() { URI location = URI.create("http://example.com"); Mono<ServerResponse> result = ServerResponse.created(location).build(); StepVerifier.create(result) .expectNextMatches(response -> HttpStatus.CREATED.equals(response.statusCode()) && location.equals(response.headers().getLocation())) .expectComplete() .verify(); }
@Test public void seeOther() { URI location = URI.create("http://example.com"); Mono<ServerResponse> result = ServerResponse.seeOther(location).build(); StepVerifier.create(result) .expectNextMatches(response -> HttpStatus.SEE_OTHER.equals(response.statusCode()) && location.equals(response.headers().getLocation())) .expectComplete() .verify(); }