![JAR search and dependency download from the Maven repository](/logo.png)
com.mitchellbosecke.pebble.extension.core.OddTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pebble Show documentation
Show all versions of pebble Show documentation
Templating engine for Java.
/*******************************************************************************
* This file is part of Pebble.
*
* Copyright (c) 2014 by Mitchell Bösecke
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
******************************************************************************/
package com.mitchellbosecke.pebble.extension.core;
import java.util.List;
import java.util.Map;
import com.mitchellbosecke.pebble.extension.Test;
public class OddTest implements Test {
@Override
public List getArgumentNames() {
return null;
}
@Override
public boolean apply(Object input, Map args) {
if (input == null) {
throw new IllegalArgumentException("Can not pass null value to \"odd\" test.");
}
EvenTest evenTest = new EvenTest();
return evenTest.apply(input, args) == false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy