Class IsInWhenPresent<T>

java.lang.Object
org.mybatis.dynamic.sql.AbstractListValueCondition<T>
org.mybatis.dynamic.sql.where.condition.IsInWhenPresent<T>
All Implemented Interfaces:
VisitableCondition<T>

public class IsInWhenPresent<T> extends AbstractListValueCondition<T>
  • Constructor Details

    • IsInWhenPresent

      protected IsInWhenPresent(Collection<T> values)
  • Method Details

    • empty

      public static <T> IsInWhenPresent<T> empty()
    • operator

      public String operator()
      Specified by:
      operator in class AbstractListValueCondition<T>
    • filter

      public IsInWhenPresent<T> filter(Predicate<? super T> predicate)
      Description copied from class: AbstractListValueCondition
      If not empty, apply the predicate to each value in the list and return a new condition with the filtered values. Else returns an empty condition (this).
      Specified by:
      filter in class AbstractListValueCondition<T>
      Parameters:
      predicate - predicate applied to the values, if not empty
      Returns:
      a new condition with filtered values if renderable, otherwise an empty condition
    • map

      public <R> IsInWhenPresent<R> map(Function<? super T,? extends R> mapper)
      If not empty, apply the mapping to each value in the list return a new condition with the mapped values. Else return an empty condition (this).
      Type Parameters:
      R - type of the new condition
      Parameters:
      mapper - a mapping function to apply to the values, if not empty
      Returns:
      a new condition with mapped values if renderable, otherwise an empty condition
    • of

      @SafeVarargs public static <T> IsInWhenPresent<T> of(T... values)
    • of

      public static <T> IsInWhenPresent<T> of(Collection<T> values)