@Test public void testEquals() { assertThat(streamConnection.equals(null)).isFalse(); assertThat(streamConnection.equals(streamConnection)).isTrue(); StreamConnection identicalStreamConnection = new StreamConnection(StreamConnectionId.of("foo")); assertThat(streamConnection.equals(identicalStreamConnection)).isTrue(); assertThat(identicalStreamConnection.equals(streamConnection)).isTrue(); StreamConnection nonIdenticalStreamConnection = new StreamConnection(StreamConnectionId.of("foo1")); assertThat(streamConnection.equals(nonIdenticalStreamConnection)).isFalse(); assertThat(nonIdenticalStreamConnection.equals(streamConnection)).isFalse(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StreamConnection that = (StreamConnection) obj; return streamConnectionId.equals(that.streamConnectionId); }
StreamConnection implements Closeable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StreamConnection that = (StreamConnection) obj; return streamConnectionId.equals(that.streamConnectionId); } }
StreamConnection implements Closeable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StreamConnection that = (StreamConnection) obj; return streamConnectionId.equals(that.streamConnectionId); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); }
StreamConnection implements Closeable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StreamConnection that = (StreamConnection) obj; return streamConnectionId.equals(that.streamConnectionId); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); UnsignedLong nextSequence(); Instant getCreationDateTime(); void transitionConnectionState(); StreamConnectionState getConnectionState(); StreamConnectionId getStreamConnectionId(); void closeConnection(); boolean isClosed(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override void close(); }
StreamConnection implements Closeable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StreamConnection that = (StreamConnection) obj; return streamConnectionId.equals(that.streamConnectionId); } StreamConnection(final InterledgerAddress receiverAddress, final SharedSecret sharedSecret);  StreamConnection(final StreamConnectionId streamConnectionId); UnsignedLong nextSequence(); Instant getCreationDateTime(); void transitionConnectionState(); StreamConnectionState getConnectionState(); StreamConnectionId getStreamConnectionId(); void closeConnection(); boolean isClosed(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override void close(); static final UnsignedLong MAX_FRAMES_PER_CONNECTION; }