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

com.evrythng.commons.validation.preconditions.EqualTo Maven / Gradle / Ivy

There is a newer version: 1.33
Show newest version
/*
 * (c) Copyright 2016 EVRYTHNG Ltd London / Zurich
 * www.evrythng.com
 */

package com.evrythng.commons.validation.preconditions;

public final class EqualTo extends AbstractPrecondition {

	private static final String NAME = "NOT_NULL";
	private final TARGET comparison;

	public static  EqualTo equalTo(final T comparison) {

		return new EqualTo<>(comparison);
	}

	private EqualTo(final TARGET comparison) {

		super(NAME);
		this.comparison = comparison;
	}

	@Override
	public final boolean test(final TARGET target) {

		return target.equals(comparison);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy