@FunctionalInterface
public interface GraphEdgeFilterI
GraphEdgeI
instances according to some criteria.
As this interface contains a single abstract method, it is a
FunctionalInterface
and can be implemented using a lambda expression
(e.g., edge -> edge.getWeight() > 10
) or a method reference in
Java 8 and later.
Modifier and Type | Method and Description |
---|---|
static GraphEdgeFilterI |
acceptAll()
Returns a filter that always evaluates to true.
|
default GraphEdgeFilterI |
and(GraphEdgeFilterI other)
Returns a composed filter that represents a short-circuiting logical AND of
this filter and another.
|
boolean |
fits(GraphEdgeI edge)
Checks if the given graph edge meets the filter's criteria.
|
default GraphEdgeFilterI |
negate()
Returns a filter that represents the logical negation of this filter.
|
default GraphEdgeFilterI |
or(GraphEdgeFilterI other)
Returns a composed filter that represents a short-circuiting logical OR of
this filter and another.
|
static GraphEdgeFilterI |
rejectAll()
Returns a filter that always evaluates to false.
|
boolean fits(GraphEdgeI edge)
edge
- The GraphEdgeI
instance to check.
Implementations should define behavior for null inputs,
though typically callers should avoid passing null.true
if the edge meets the criteria (i.e., "fits"),
false
otherwise.default GraphEdgeFilterI and(GraphEdgeFilterI other)
false
, then the other
filter is not evaluated.other
- a GraphEdgeFilterI
that will be logically-ANDed with this filterother
filterjava.lang.NullPointerException
- if other is nulldefault GraphEdgeFilterI or(GraphEdgeFilterI other)
true
, then the other
filter is not evaluated.other
- a GraphEdgeFilterI
that will be logically-ORed with this filterother
filterjava.lang.NullPointerException
- if other is nulldefault GraphEdgeFilterI negate()
static GraphEdgeFilterI acceptAll()
static GraphEdgeFilterI rejectAll()
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.