@SuppressWarnings( "EqualsWithItself" ) @Test public void testEquals() { final ChannelAddress address = new ChannelAddress( 1, 2, 1 ); final ChannelAddress address2 = new ChannelAddress( 1, 2, 2 ); final ChannelAddress address3 = new ChannelAddress( 1, 1 ); assertTrue( address.equals( address ) ); assertFalse( address.equals( new Object() ) ); assertFalse( address.equals( address2 ) ); assertFalse( address.equals( address3 ) ); }
@Override public boolean equals( final Object o ) { if ( this == o ) { return true; } else if ( o == null || getClass() != o.getClass() ) { return false; } else { final ChannelAddress that = (ChannelAddress) o; return Objects.equals( _systemId, that._systemId ) && Objects.equals( _channelId, that._channelId ) && Objects.equals( _id, that._id ); } }
ChannelAddress implements Comparable<ChannelAddress> { @Override public boolean equals( final Object o ) { if ( this == o ) { return true; } else if ( o == null || getClass() != o.getClass() ) { return false; } else { final ChannelAddress that = (ChannelAddress) o; return Objects.equals( _systemId, that._systemId ) && Objects.equals( _channelId, that._channelId ) && Objects.equals( _id, that._id ); } } }
ChannelAddress implements Comparable<ChannelAddress> { @Override public boolean equals( final Object o ) { if ( this == o ) { return true; } else if ( o == null || getClass() != o.getClass() ) { return false; } else { final ChannelAddress that = (ChannelAddress) o; return Objects.equals( _systemId, that._systemId ) && Objects.equals( _channelId, that._channelId ) && Objects.equals( _id, that._id ); } } ChannelAddress( final int systemId, final int channelId );  ChannelAddress( final int systemId, final int channelId, @Nullable final Integer id ); }
ChannelAddress implements Comparable<ChannelAddress> { @Override public boolean equals( final Object o ) { if ( this == o ) { return true; } else if ( o == null || getClass() != o.getClass() ) { return false; } else { final ChannelAddress that = (ChannelAddress) o; return Objects.equals( _systemId, that._systemId ) && Objects.equals( _channelId, that._channelId ) && Objects.equals( _id, that._id ); } } ChannelAddress( final int systemId, final int channelId );  ChannelAddress( final int systemId, final int channelId, @Nullable final Integer id ); int getSystemId(); int getChannelId(); @Nullable Integer getId(); @Override String toString(); @Nonnull String getName(); @Nonnull String asChannelDescriptor(); @Nonnull String getCacheKey(); @Nonnull static ChannelAddress parse( final int schema, @Nonnull final String channel ); @Override boolean equals( final Object o ); @Override int hashCode(); @Override int compareTo( @Nonnull final ChannelAddress o ); }
ChannelAddress implements Comparable<ChannelAddress> { @Override public boolean equals( final Object o ) { if ( this == o ) { return true; } else if ( o == null || getClass() != o.getClass() ) { return false; } else { final ChannelAddress that = (ChannelAddress) o; return Objects.equals( _systemId, that._systemId ) && Objects.equals( _channelId, that._channelId ) && Objects.equals( _id, that._id ); } } ChannelAddress( final int systemId, final int channelId );  ChannelAddress( final int systemId, final int channelId, @Nullable final Integer id ); int getSystemId(); int getChannelId(); @Nullable Integer getId(); @Override String toString(); @Nonnull String getName(); @Nonnull String asChannelDescriptor(); @Nonnull String getCacheKey(); @Nonnull static ChannelAddress parse( final int schema, @Nonnull final String channel ); @Override boolean equals( final Object o ); @Override int hashCode(); @Override int compareTo( @Nonnull final ChannelAddress o );  }