Java Code Examples for org.apache.commons.collections.CollectionUtils#exists()
The following examples show how to use
org.apache.commons.collections.CollectionUtils#exists() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseAuthenticationService.java From uyuni with GNU General Public License v2.0 | 5 votes |
protected boolean requestURIRequiresAuthentication(final HttpServletRequest request) { return !CollectionUtils.exists(getUnprotectedURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 2
Source File: BaseAuthenticationService.java From uyuni with GNU General Public License v2.0 | 5 votes |
protected boolean requestURIdoesLogin(final HttpServletRequest request) { return CollectionUtils.exists(getLoginURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 3
Source File: BaseAuthenticationService.java From uyuni with GNU General Public License v2.0 | 5 votes |
protected boolean requestPostCsfrWhitelist(final HttpServletRequest request) { return CollectionUtils.exists(getPostUnprotectedURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 4
Source File: BaseAuthenticationService.java From spacewalk with GNU General Public License v2.0 | 5 votes |
protected boolean requestURIRequiresAuthentication(final HttpServletRequest request) { return !CollectionUtils.exists(getUnprotectedURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 5
Source File: BaseAuthenticationService.java From spacewalk with GNU General Public License v2.0 | 5 votes |
protected boolean requestURIdoesLogin(final HttpServletRequest request) { return CollectionUtils.exists(getLoginURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 6
Source File: BaseAuthenticationService.java From spacewalk with GNU General Public License v2.0 | 5 votes |
protected boolean requestPostCsfrWhitelist(final HttpServletRequest request) { return CollectionUtils.exists(getPostUnprotectedURIs(), new Predicate() { public boolean evaluate(Object uri) { return request.getRequestURI().startsWith(uri.toString()); } }); }
Example 7
Source File: ListContainsAny.java From levelup-java-examples with Apache License 2.0 | 5 votes |
@Test public void list_contains_any_apache_commons() { boolean vehiclesContainYukon = CollectionUtils.exists(vehicles, new org.apache.commons.collections.Predicate() { public boolean evaluate(Object object) { Vehicle vehicle = (Vehicle) object; return vehicle.model.contains("YUKON"); } }); assertTrue(vehiclesContainYukon); }