io.github.paulmarcelinbejan.toolbox.validathor.Validathor Maven / Gradle / Ivy
package io.github.paulmarcelinbejan.toolbox.validathor;
import java.util.Collections;
import java.util.List;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Base Validathor
*/
@Getter
@RequiredArgsConstructor(access = AccessLevel.PROTECTED)
public abstract class Validathor {
/**
* class of the parameter type T
*/
private final Class typeParameterClass;
/**
* return true if the parameter is valid, false otherwise
*/
public abstract boolean isValid(T toValidate);
/**
* return the list of fields name that must be skipped from beeing validated
*/
public List getFieldsNameToSkip() {
return Collections.emptyList();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy