@FunctionalInterface public interface CompositeTypeFilter extends TypeFilter
TypeFilter
implementation using the Composite Software Design Pattern to compose multiple
TypeFilters
acting a single instance of TypeFilter
.TypeFilter
,
Composite Software Design PatternModifier and Type | Field and Description |
---|---|
static CompositeTypeFilter |
ALLOW |
static CompositeTypeFilter |
DENY |
Modifier and Type | Method and Description |
---|---|
default CompositeTypeFilter |
andThen(TypeFilter typeFilter)
Composes this
TypeFilter with the given TypeFilter
using the logical AND operator. |
static TypeFilter |
composeAnd(Iterable<TypeFilter> iterable)
Composes the
Iterable of TypeFilters into a Composite TypeFilter
that acts as a single instance of TypeFilter . |
static TypeFilter |
composeAnd(TypeFilter... array)
Composes the array of
TypeFilters into a Composite TypeFilter
that acts as a single instance of TypeFilter . |
static TypeFilter |
composeOr(Iterable<TypeFilter> iterable)
Composes the
Iterable of TypeFilters into a Composite TypeFilter
that acts as a single instance of TypeFilter . |
static TypeFilter |
composeOr(TypeFilter... array)
Composes the array of
TypeFilters into a Composite TypeFilter
that acts as a single instance of TypeFilter . |
default CompositeTypeFilter |
negate()
Negates the result of this
TypeFilter's
TypeFilter.match(MetadataReader, MetadataReaderFactory) operation. |
static CompositeTypeFilter |
of(TypeFilter typeFilter)
Wraps an existing
TypeFilter in an instance of CompositeTypeFilter . |
default CompositeTypeFilter |
orThen(TypeFilter typeFilter)
Composes this
TypeFilter with the given TypeFilter
using the logical OR operator. |
match
static final CompositeTypeFilter ALLOW
static final CompositeTypeFilter DENY
@NonNull default CompositeTypeFilter andThen(@NonNull TypeFilter typeFilter)
TypeFilter
with the given TypeFilter
using the logical AND operator.typeFilter
- TypeFilter
to compose with this TypeFilter
;
must not be null.TypeFilter
consisting of this TypeFilter
and the given TypeFilter
.IllegalArgumentException
- if TypeFilter
is null.TypeFilter
,
orThen(TypeFilter)
@Nullable static TypeFilter composeAnd(@Nullable TypeFilter... array)
TypeFilters
into a Composite TypeFilter
that acts as a single instance of TypeFilter
.
The Composite TypeFilter
may be treated as a single instance of TypeFilter
, too,
given CompositeTypeFilter
extends (i.e. "is a") TypeFilter
.array
- array of TypeFilters
to compose.TypeFilter
composed from the array of TypeFilers
using the logical AND operator; may return null.TypeFilter
,
composeAnd(Iterable)
@Nullable static TypeFilter composeAnd(@Nullable Iterable<TypeFilter> iterable)
Iterable
of TypeFilters
into a Composite TypeFilter
that acts as a single instance of TypeFilter
.
The Composite TypeFilter
may be treated as a single instance of TypeFilter
, too,
given CompositeTypeFilter
extends (i.e. "is a") TypeFilter
.iterable
- Iterable
of TypeFilters
to compose.TypeFilter
composed from the Iterable
of TypeFilers
using the logical AND operator; may return null.TypeFilter
,
Iterable
@Nullable static TypeFilter composeOr(@Nullable TypeFilter... array)
TypeFilters
into a Composite TypeFilter
that acts as a single instance of TypeFilter
.
The Composite TypeFilter
may be treated as a single instance of TypeFilter
, too,
given CompositeTypeFilter
extends (i.e. "is a") TypeFilter
.array
- array of TypeFilters
to compose.TypeFilter
composed from the array of TypeFilers
using the logical OR operator; may return null.TypeFilter
,
composeOr(Iterable)
@Nullable static TypeFilter composeOr(@Nullable Iterable<TypeFilter> iterable)
Iterable
of TypeFilters
into a Composite TypeFilter
that acts as a single instance of TypeFilter
.
The Composite TypeFilter
may be treated as a single instance of TypeFilter
, too,
given CompositeTypeFilter
extends (i.e. "is a") TypeFilter
.iterable
- Iterable
of TypeFilters
to compose.TypeFilter
composed from the Iterable
of TypeFilers
using the logical OR operator; may return null.TypeFilter
,
Iterable
@NonNull static CompositeTypeFilter of(@NonNull TypeFilter typeFilter)
TypeFilter
in an instance of CompositeTypeFilter
.typeFilter
- TypeFilter
to wrap; must not be null.CompositeTypeFilter
wrapping the existing TypeFilter
.IllegalArgumentException
- if TypeFilter
is null.TypeFilter
@NonNull default CompositeTypeFilter negate()
TypeFilter's
TypeFilter.match(MetadataReader, MetadataReaderFactory)
operation.TypeFilter
negated.CompositeTypeFilter
@NonNull default CompositeTypeFilter orThen(@NonNull TypeFilter typeFilter)
TypeFilter
with the given TypeFilter
using the logical OR operator.typeFilter
- TypeFilter
to compose with this TypeFilter
;
must not be null.TypeFilter
consisting of this TypeFilter
and the given TypeFilter
.IllegalArgumentException
- if TypeFilter
is null.TypeFilter
,
andThen(TypeFilter)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.