org.apache.felix.ipojo.manipulator.spi.helper

## Class Predicates

- java.lang.Object
- - org.apache.felix.ipojo.manipulator.spi.helper.Predicates

    public class Predicates
    extends Object

Ready-to-use `Predicate` implementations.

Author:
  Felix Project Team

### Nested Class Summary

Nested Classes
`static class` `Predicates.Matcher`
`static class` `Predicates.Node`
`static class` `Predicates.Reference`

### Constructor Summary

Constructors
Constructor and Description
`Predicates()`

### Method Summary

All Methods Static Methods Concrete Methods
`static Predicate` `alwaysTrue()` Always return true.
`static Predicate` `and(Predicate... predicates)` Successful if all given predicates are satisfied.
`static Predicates.Node` `node()`
`static Predicate` `on(ElementType type)` Restrict to the given `ElementType`.
`static Predicate` `onlySupportedElements(Class<? extends Annotation> annotationType)` Restrict to the supported `ElementType`(s) of the annotation (use the @Target, if provided).
`static Predicate` `or(Collection<Predicate> predicates)` Successful if at least one of the given predicates is satisfied.
`static Predicate` `or(Predicate... predicates)` Successful if at least one of the given predicates is satisfied.
`static Predicates.Matcher` `pattern(String regex)`
`static Predicates.Reference` `reference(String refId)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Predicates

    public Predicates()

### Method Detail

#### node

    public static Predicates.Node node()

#### reference

    public static Predicates.Reference reference(String refId)

#### pattern

    public static Predicates.Matcher pattern(String regex)

#### on

    public static Predicate on(ElementType type)

Restrict to the given `ElementType`.

Parameters:
  `type` - expected `ElementType`

#### alwaysTrue

    public static Predicate alwaysTrue()

Always return true.

#### and

    public static Predicate and(Predicate... predicates)

Successful if all given predicates are satisfied.

Parameters:
  `predicates` - predicates to be satisfied

#### or

    public static Predicate or(Collection<Predicate> predicates)

Successful if at least one of the given predicates is satisfied.

Parameters:
  `predicates` - predicates to be satisfied (at least one)

#### or

    public static Predicate or(Predicate... predicates)

Successful if at least one of the given predicates is satisfied.

Parameters:
  `predicates` - predicates to be satisfied (at least one)

#### onlySupportedElements

    public static Predicate onlySupportedElements(Class<? extends Annotation> annotationType)

Restrict to the supported `ElementType`(s) of the annotation (use the @Target, if provided).

Parameters:
  `annotationType` - annotation to explore