Class BranchesIntermediary<T extends MqlValue,R extends MqlValue>

java.lang.Object
com.mongodb.client.model.mql.BranchesTerminal<T,R>
com.mongodb.client.model.mql.BranchesIntermediary<T,R>
Type Parameters:
T - the type of the values that may be checked.
R - the type of the value produced.

@Beta(CLIENT) public final class BranchesIntermediary<T extends MqlValue,R extends MqlValue> extends BranchesTerminal<T,R>
Since:
4.9.0
  • Method Details

    • is

      public BranchesIntermediary<T,R> is(Function<? super T,MqlBoolean> predicate, Function<? super T,? extends R> mapping)
      A successful check for the specified predicate produces a value specified by the mapping.
      Parameters:
      predicate - the predicate.
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • eq

      public BranchesIntermediary<T,R> eq(T v, Function<? super T,? extends R> mapping)
      A successful check for equality produces a value specified by the mapping.
      Parameters:
      v - the value to check against.
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • lt

      public BranchesIntermediary<T,R> lt(T v, Function<? super T,? extends R> mapping)
      A successful check for being less than the provided value v produces a value specified by the mapping.
      Parameters:
      v - the value to check against.
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • lte

      public BranchesIntermediary<T,R> lte(T v, Function<? super T,? extends R> mapping)
      A successful check for being less than or equal to the provided value v produces a value specified by the mapping.
      Parameters:
      v - the value to check against.
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isBoolean

      public BranchesIntermediary<T,R> isBoolean(Function<? super MqlBoolean,? extends R> mapping)
      A successful check for being a boolean produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isNumber

      public BranchesIntermediary<T,R> isNumber(Function<? super MqlNumber,? extends R> mapping)
      A successful check for being a number produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
      Since server release
      4.4
    • isInteger

      public BranchesIntermediary<T,R> isInteger(Function<? super MqlInteger,? extends R> mapping)
      A successful check for being an integer produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
      Since server release
      4.4
    • isString

      public BranchesIntermediary<T,R> isString(Function<? super MqlString,? extends R> mapping)
      A successful check for being a string produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isDate

      public BranchesIntermediary<T,R> isDate(Function<? super MqlDate,? extends R> mapping)
      A successful check for being a date produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isArray

      public <Q extends MqlValue> BranchesIntermediary<T,R> isArray(Function<? super MqlArray<@MqlUnchecked(TYPE_ARGUMENT) Q>,? extends R> mapping)
      A successful check for being an array produces a value specified by the mapping.

      Warning: The type argument of the array is not enforced by the API. The use of this method is an unchecked assertion that the type argument is correct.

      Type Parameters:
      Q - the type of the elements of the resulting array.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isDocument

      public BranchesIntermediary<T,R> isDocument(Function<? super MqlDocument,? extends R> mapping)
      A successful check for being a document (or document-like value, see MqlMap and MqlEntry) produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isMap

      public <Q extends MqlValue> BranchesIntermediary<T,R> isMap(Function<? super MqlMap<@MqlUnchecked(TYPE_ARGUMENT) Q>,? extends R> mapping)
      A successful check for being a map (or map-like value, see MqlDocument and MqlEntry) produces a value specified by the mapping.

      Warning: The type argument of the map is not enforced by the API. The use of this method is an unchecked assertion that the type argument is correct.

      Type Parameters:
      Q - the type of the array.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • isNull

      public BranchesIntermediary<T,R> isNull(Function<? super MqlValue,? extends R> mapping)
      A successful check for MqlValues.ofNull() being the null value} produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.
    • defaults

      public BranchesTerminal<T,R> defaults(Function<? super T,? extends R> mapping)
      If no other check succeeds, produces a value specified by the mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the appended sequence of checks.