public abstract class Filter extends LValue
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name
The name of the filter.
|
BREAK, CONTINUE, rubyDateTimeFormat| Modifier | Constructor and Description |
|---|---|
protected |
Filter()
Used for all package protected filters in the liqp.filters-package whose name is their class name
lower cased.
|
|
Filter(java.lang.String name)
Creates a new instance of a Filter.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
apply(java.lang.Object value,
java.lang.Object... params)
Deprecated.
|
java.lang.Object |
apply(java.lang.Object value,
TemplateContext context,
java.lang.Object... params)
Applies the filter on the 'value', with the given 'context'.
|
protected java.lang.Object |
get(int index,
java.lang.Object... params)
Returns a value at a specific index from an array of parameters.
|
static Filters |
getCurrentFilters(Flavor flavor)
Deprecated.
|
static Filter |
getFilter(java.lang.String name)
Deprecated.
|
static java.util.Map<java.lang.String,Filter> |
getFilters()
Deprecated.
|
static java.util.Map<java.lang.String,Filter> |
getFilters(Flavor flavor)
Deprecated.
|
java.lang.String |
getName()
Returns the name of the filter.
|
static void |
registerFilter(Filter filter)
Deprecated.
|
areEqual, asAppendableObject, asArray, asBoolean, asFormattedNumber, asList, asMap, asNumber, asString, asTemporal, canBeDouble, canBeInteger, isArray, isFalsy, isInteger, isMap, isNumber, isString, isTemporal, isTruthy, mapAsArray, temporalAsArrayprotected Filter()
public Filter(java.lang.String name)
name - the name of the filter.public java.lang.String getName()
@Deprecated
public java.lang.Object apply(java.lang.Object value,
java.lang.Object... params)
apply(Object, TemplateContext, Object...)value - the string value `AAA` in: `{{ 'AAA' | f:1,2,3 }}`params - the values [1, 2, 3] in: `{{ 'AAA' | f:1,2,3 }}`public java.lang.Object apply(java.lang.Object value,
TemplateContext context,
java.lang.Object... params)
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 }}`protected java.lang.Object get(int index,
java.lang.Object... params)
index - the index of the value to be retrieved.params - the values.@Deprecated public static Filter getFilter(java.lang.String name)
Filters.get(String)name - the name of the filter to retrieve.@Deprecated public static java.util.Map<java.lang.String,Filter> getFilters()
ParseSettings.filtersFlavor.JEKYLL.@Deprecated public static java.util.Map<java.lang.String,Filter> getFilters(Flavor flavor)
Flavor.getFilters()Flavor.JEKYLL.@Deprecated public static void registerFilter(Filter filter)
ParseSettings.Builder.with(Filter)filter - the filter to be registered.Copyright © 2012–2023. All rights reserved.