本文整理匯總了Java中org.apache.commons.collections4.Predicate.evaluate方法的典型用法代碼示例。如果您正苦於以下問題:Java Predicate.evaluate方法的具體用法?Java Predicate.evaluate怎麽用?Java Predicate.evaluate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.collections4.Predicate
的用法示例。
在下文中一共展示了Predicate.evaluate方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getTickets
import org.apache.commons.collections4.Predicate; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Timed(name = "GET_TICKETS_TIMER")
@Metered(name = "GET_TICKETS_METER")
@Counted(name="GET_TICKETS_COUNTER", monotonic=true)
@Override
public Collection<Ticket> getTickets(final Predicate predicate) {
final Collection<Ticket> c = new HashSet<>(this.ticketRegistry.getTickets());
final Iterator<Ticket> it = c.iterator();
while (it.hasNext()) {
if (!predicate.evaluate(it.next())) {
it.remove();
}
}
return c;
}
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:18,代碼來源:CentralAuthenticationServiceImpl.java
示例2: evaluate
import org.apache.commons.collections4.Predicate; //導入方法依賴的package包/類
/**
* Evaluates the predicate returning true if only one decorated predicate
* returns true.
*
* @param object the input object
* @return true if only one decorated predicate returns true
*/
public boolean evaluate(final T object) {
boolean match = false;
for (final Predicate<? super T> iPredicate : iPredicates) {
if (iPredicate.evaluate(object)) {
if (match) {
return false;
}
match = true;
}
}
return match;
}
示例3: evaluate
import org.apache.commons.collections4.Predicate; //導入方法依賴的package包/類
/**
* Evaluates the predicate returning true if all predicates return true.
*
* @param object the input object
* @return true if all decorated predicates return true
*/
public boolean evaluate(final T object) {
for (final Predicate<? super T> iPredicate : iPredicates) {
if (!iPredicate.evaluate(object)) {
return false;
}
}
return true;
}
示例4: evaluate
import org.apache.commons.collections4.Predicate; //導入方法依賴的package包/類
/**
* Evaluates the predicate returning false if any stored predicate returns false.
*
* @param object the input object
* @return true if none of decorated predicates return true
*/
public boolean evaluate(final T object) {
for (final Predicate<? super T> iPredicate : iPredicates) {
if (iPredicate.evaluate(object)) {
return false;
}
}
return true;
}
示例5: evaluate
import org.apache.commons.collections4.Predicate; //導入方法依賴的package包/類
/**
* Evaluates the predicate returning true if any predicate returns true.
*
* @param object the input object
* @return true if any decorated predicate return true
*/
public boolean evaluate(final T object) {
for (final Predicate<? super T> iPredicate : iPredicates) {
if (iPredicate.evaluate(object)) {
return true;
}
}
return false;
}