return new TorrentState(from(torrentState.torrentFiles()).filter(new Predicate<TorrentFile>() {
@Override
public boolean apply(TorrentFile torrentFile) {
- return (torrentFile == null) ? false : nameDoesNotMatchAFilterWord(torrentFile.name());
+ return (torrentFile != null) && nameDoesNotMatchAFilterWord(torrentFile.name());
}
private boolean nameDoesNotMatchAFilterWord(final String name) {
if (!name.equals(parameter.name)) {
return false;
}
- if (!value.equals(parameter.value)) {
- return false;
- }
- return true;
+ return value.equals(parameter.value);
}
}
if (!action.equals(chain.action)) {
return false;
}
- if (updateInterval != chain.updateInterval) {
- return false;
- }
- return true;
+ return updateInterval == chain.updateInterval;
}
}