@Beta public abstract class IfFeatureExpr extends Object implements Immutable, Predicate<Set<QName>>
if-feature
expression, implementing a Predicate
. Internal representation is that of
a tree of expressions, optimized for memory usage. negate()
performs an efficient logical negation without
relying on default predicate methods. Other Predicate methods, like Predicate.and(Predicate)
are not optimized in
this implementation.
The set of features referenced in this expression is available through getReferencedFeatures()
.
Constructor and Description |
---|
IfFeatureExpr() |
Modifier and Type | Method and Description |
---|---|
static @NonNull IfFeatureExpr |
and(Set<IfFeatureExpr> exprs)
Construct a intersection (logical
AND ) expression of specified expressions. |
abstract boolean |
equals(Object obj) |
abstract @NonNull Set<QName> |
getReferencedFeatures()
Returns the set of all
feature s referenced by this expression. |
abstract int |
hashCode() |
static @NonNull IfFeatureExpr |
isPresent(QName qname)
Construct an assertion that a feature is present in the set passed to
test(Set) . |
abstract @NonNull IfFeatureExpr |
negate() |
static @NonNull IfFeatureExpr |
or(Set<IfFeatureExpr> exprs)
Construct a union (logical
OR ) expression of specified expressions. |
abstract boolean |
test(Set<QName> supportedFeatures) |
abstract String |
toString() |
public static final @NonNull IfFeatureExpr isPresent(QName qname)
test(Set)
.qname
- Feature QNameNullPointerException
- if qname
is nullpublic static final @NonNull IfFeatureExpr and(Set<IfFeatureExpr> exprs)
AND
) expression of specified expressions.exprs
- Constituent expressionsNullPointerException
- if exprs
or any of its members is nullIllegalArgumentException
- if exprs
is emptypublic static final @NonNull IfFeatureExpr or(Set<IfFeatureExpr> exprs)
OR
) expression of specified expressions.exprs
- Constituent expressionsNullPointerException
- if exprs
or any of its members is nullIllegalArgumentException
- if exprs
is emptypublic abstract @NonNull Set<QName> getReferencedFeatures()
feature
s referenced by this expression. Each feature is identified by its QName.public abstract @NonNull IfFeatureExpr negate()
Copyright © 2020 OpenDaylight. All rights reserved.