
liqp.filters.First Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquid Show documentation
Show all versions of liquid Show documentation
A Java implementation of the Liquid templating engine backed up by an ANTLR grammar.
The newest version!
package liqp.filters;
class First extends Filter {
/*
* first(array)
*
* Get the first element of the passed in array
*/
@Override
public Object apply(Object value, Object... params) {
Object[] array = super.asArray(value);
return array.length == 0 ? null : super.asString(array[0]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy