com.evrythng.commons.validation.preconditions.GreaterThan Maven / Gradle / Ivy
/*
* (c) Copyright 2016 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
package com.evrythng.commons.validation.preconditions;
public final class GreaterThan> extends AbstractPrecondition {
private static final String NAME = "GREATER_THAN";
private final TARGET minimum;
public static > GreaterThan greaterThan(final T minimum) {
return new GreaterThan<>(minimum);
}
private GreaterThan(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