Package liqp.filters

Class Where


public class Where extends Filter
There are two different implementations of this filter in ruby. One is from shopify/liquid package: https://github.com/Shopify/liquid/blob/master/lib/liquid/standardfilters.rb https://github.com/Shopify/liquid/blob/master/test/integration/standard_filter_test.rb And the other is from jekyll/jekyll package: https://github.com/jekyll/jekyll/blob/master/lib/jekyll/filters.rb https://github.com/jekyll/jekyll/blob/master/test/test_filters.rb The differ between them are in how they work with objects and arrays as second argument. And this is rare usage case, and even more, java is not a ruby so we cannot implement exact behavior for these edge cases.
  • Constructor Details

    • Where

      public Where()
  • Method Details

    • apply

      public Object apply(Object value, TemplateContext context, Object... params)
      Description copied from class: Filter
      Applies the filter on the 'value', with the given 'context'.
      Overrides:
      apply in class Filter
      Parameters:
      value - the string value `AAA` in: `{{ 'AAA' | f:1,2,3 }}`
      context - the template context.
      params - the values [1, 2, 3] in: `{{ 'AAA' | f:1,2,3 }}`
      Returns:
      the result of the filter.