net.avcompris.commons.query.impl.BooleanArg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avc-commons3-query Show documentation
Show all versions of avc-commons3-query Show documentation
Common classes for avc-commons3 queries and filtering.
package net.avcompris.commons.query.impl;
import static com.google.common.base.Preconditions.checkNotNull;
import net.avcompris.commons.query.Arg;
import net.avcompris.commons.query.FilterSyntaxException;
final class BooleanArg implements Arg {
public final boolean b;
public BooleanArg(final String s) throws FilterSyntaxException {
checkNotNull(s, "s");
try {
this.b = Boolean.parseBoolean(s);
} catch (final NumberFormatException e) {
throw new FilterSyntaxException("Cannot parse boolean value: " + s, e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy