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

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

/*
 * (c) Copyright 2016 EVRYTHNG Ltd London / Zurich
 * www.evrythng.com
 */

package com.evrythng.commons.validation.preconditions;

public final class GreaterThanOrEqualTo> extends AbstractPrecondition {

	private static final String NAME = "GREATER_THAN_OR_EQUAL_TO";
	private final TARGET minimum;

	public static > GreaterThanOrEqualTo greaterThanOrEqualTo(final T minimum) {

		return new GreaterThanOrEqualTo<>(minimum);
	}

	private GreaterThanOrEqualTo(final TARGET minimum) {

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

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

		return target.compareTo(minimum) >= 0;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy