[W.I.P] Make Validator interface generic with template

Using template, Make Validator interface generic.

    public interface Validator<E> {
    /**
     * validate the input document and returns the invalid points.
     * @param block input
     * @return List of ValidationError
     */
     List<ValidationError> validate(E block);
    }