Filters for selecting just the elements of interest from a
collection of elements. The returned sets and lists are new
collections and do use the argument as a backing store. The
methods in this class do not make any attempts to guard against
concurrent modifications of the arguments. The returned sets and
lists are mutable but unsafe for concurrent access. A returned set
has the same iteration order as the argument set to a method.
If iterables and sets containing null
are passed as
arguments to methods in this class, a NullPointerException
will be thrown.
Note that a static import statement can make the text of
calls to the methods in this class more concise; for example:
import static javax.lang.model.util.ElementFilter.*;
...
List<VariableElement>
fs = fieldsIn(someClass.getEnclosedElements());