<N extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<N>>
@NonNull MatchBuilderPath<O, N> extractChild(Class<@NonNull N> listItem, K listKey);
+ /**
+ * Match an {@code boolean} leaf's value.
+ *
+ * @param methodRef method reference to the getter method
+ * @return A {@link ValueMatchBuilder}
+ * @throws NullPointerException if methodRef is null
+ */
+ @NonNull ValueMatchBuilder<O, Boolean> leaf(BooleanLeafReference<T> methodRef);
+
/**
* Match an {@code empty} leaf's value.
*
C dummyMethod(P parent);
}
+ @FunctionalInterface
+ public interface BooleanLeafReference<P> extends LeafReference<P, Boolean> {
+
+ }
+
@FunctionalInterface
public interface EmptyLeafReference<P> extends LeafReference<P, Empty> {
import org.opendaylight.yang.gen.v1.mdsal.query.norev.first.grp.SystemKey;
import org.opendaylight.yang.gen.v1.mdsal.query.norev.second.grp.Alarms;
import org.opendaylight.yang.gen.v1.mdsal.query.norev.third.grp.AffectedUsers;
+import org.opendaylight.yang.gen.v1.mdsal426.norev.BooleanCont;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint64;
.greaterThan(Uint64.TEN)
.build();
}
+
+ public QueryExpression<BooleanCont> selectBoolean() {
+ return factory
+ .querySubtree(InstanceIdentifier.create(BooleanCont.class))
+ .matching()
+ .leaf(BooleanCont::getIsFoo)
+ .valueEquals(true)
+ .build();
+ }
}
return (MatchBuilderPath<O, N>) this;
}
+ @Override
+ public ValueMatchBuilder<O, Boolean> leaf(final BooleanLeafReference<T> methodRef) {
+ return defaultFor(methodRef);
+ }
+
@Override
public ValueMatchBuilder<O, Empty> leaf(final EmptyLeafReference<T> methodRef) {
return defaultFor(methodRef);