You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2019/09/30 13:23:17 UTC
[GitHub] [knox] risdenk commented on a change in pull request #158:
KNOX-2018 - KnoxShellTable Filtering needs greaterThan and lessThan,
equals Methods
risdenk commented on a change in pull request #158: KNOX-2018 - KnoxShellTable Filtering needs greaterThan and lessThan, equals Methods
URL: https://github.com/apache/knox/pull/158#discussion_r329572909
##########
File path: gateway-shell/src/main/java/org/apache/knox/gateway/shell/table/KnoxShellTableFilter.java
##########
@@ -82,4 +84,23 @@ public KnoxShellTable greaterThan(Comparable<? extends Object> comparable) throw
return filter(s -> s.compareTo(comparable) > 0);
Review comment:
I think you can store the predicate as a variable name and reuse it.
Something like:
`Predicate greaterThan = s -> s.compareTo(comparable) > 0;`
Might have to fix it up a bit but it would make the new methods simpler since you could say `greaterThan(s, comparable) || equalTo(s, comparable)`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services