All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.avcompris.commons.query.impl.IntArg Maven / Gradle / Ivy

There is a newer version: 0.6.3
Show newest version
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 IntArg implements Arg {

	public final int n;

	public IntArg(final String s) throws FilterSyntaxException {

		checkNotNull(s, "s");

		try {

			this.n = Integer.parseInt(s);

		} catch (final NumberFormatException e) {

			throw new FilterSyntaxException("Cannot parse int value: " + s, e);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy