All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface collections.Predicate

public interface interface Predicate
extends Serializable
Predicate is an interface for any class supporting a predicate(Object obj) method that returns true or false depending on whether obj obeys the maintained predicate.

When used as an element screener, check should return false if the element should not be allowed in the collection, in which case any attempted add or replace operation will raise an exception. Use of screened collections is a simple way to dynamically ensure that all elements have some desired property.


Method Index

 o predicate(Object)
Report whether obj obeys maintained predicate

Methods

 o predicate
 public abstract boolean predicate(Object obj)
Report whether obj obeys maintained predicate

Parameters:
obj - any object (possibly null)
Returns:
true is obeys predicate

All Packages  Class Hierarchy  This Package  Previous  Next  Index