Add query support for decimal64
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / query / MatchBuilderPath.java
index abace24cea3d0f722756933e7a0cd453c383ebd4..24fcfc22ab745077396ff77bc81c62e21b987ff0 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.mdsal.binding.api.query;
 
 import com.google.common.annotations.Beta;
 import java.io.Serializable;
+import java.math.BigDecimal;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.concepts.Mutable;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
@@ -62,6 +63,24 @@ public interface MatchBuilderPath<O extends DataObject, T extends DataObject> ex
     <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 decimal64} leaf's value.
+     *
+     * @param methodRef method reference to the getter method
+     * @return A {@link ValueMatchBuilder}
+     * @throws NullPointerException if methodRef is null
+     */
+    @NonNull ComparableMatchBuilder<O, BigDecimal> leaf(Decimal64LeafReference<T> methodRef);
+
     /**
      * Match an {@code empty} leaf's value.
      *
@@ -198,6 +217,16 @@ public interface MatchBuilderPath<O extends DataObject, T extends DataObject> ex
         C dummyMethod(P parent);
     }
 
+    @FunctionalInterface
+    public interface BooleanLeafReference<P> extends LeafReference<P, Boolean> {
+
+    }
+
+    @FunctionalInterface
+    public interface Decimal64LeafReference<P> extends LeafReference<P, BigDecimal> {
+
+    }
+
     @FunctionalInterface
     public interface EmptyLeafReference<P> extends LeafReference<P, Empty> {