@Test public void removeActionIgnoredFilterDuringMatch() { final ChannelAddress address = new ChannelAddress( 1, 2 ); final AreaOfInterestRequest.Type action = AreaOfInterestRequest.Type.REMOVE; final AreaOfInterestRequest entry = new AreaOfInterestRequest( address, action, null ); assertTrue( entry.match( action, address, null ) ); assertTrue( entry.match( action, address, "OtherFilter" ) ); assertFalse( entry.match( AreaOfInterestRequest.Type.ADD, address, null ) ); }
boolean match( @Nonnull final Type action, @Nonnull final ChannelAddress address, @Nullable final Object filter ) { return getType().equals( action ) && getAddress().equals( address ) && ( Type.REMOVE == action || FilterUtil.filtersEqual( filter, getFilter() ) ); }
AreaOfInterestRequest { boolean match( @Nonnull final Type action, @Nonnull final ChannelAddress address, @Nullable final Object filter ) { return getType().equals( action ) && getAddress().equals( address ) && ( Type.REMOVE == action || FilterUtil.filtersEqual( filter, getFilter() ) ); } }
AreaOfInterestRequest { boolean match( @Nonnull final Type action, @Nonnull final ChannelAddress address, @Nullable final Object filter ) { return getType().equals( action ) && getAddress().equals( address ) && ( Type.REMOVE == action || FilterUtil.filtersEqual( filter, getFilter() ) ); } AreaOfInterestRequest( @Nonnull final ChannelAddress address,
                         @Nonnull final Type type,
                         @Nullable final Object filter ); }
AreaOfInterestRequest { boolean match( @Nonnull final Type action, @Nonnull final ChannelAddress address, @Nullable final Object filter ) { return getType().equals( action ) && getAddress().equals( address ) && ( Type.REMOVE == action || FilterUtil.filtersEqual( filter, getFilter() ) ); } AreaOfInterestRequest( @Nonnull final ChannelAddress address,
                         @Nonnull final Type type,
                         @Nullable final Object filter ); @Override String toString(); }
AreaOfInterestRequest { boolean match( @Nonnull final Type action, @Nonnull final ChannelAddress address, @Nullable final Object filter ) { return getType().equals( action ) && getAddress().equals( address ) && ( Type.REMOVE == action || FilterUtil.filtersEqual( filter, getFilter() ) ); } AreaOfInterestRequest( @Nonnull final ChannelAddress address,
                         @Nonnull final Type type,
                         @Nullable final Object filter ); @Override String toString();  }