Campbell Ritchie wrote:Why isn't your validation method static?
Campbell Ritchie wrote:Where are you using that interface? I can't see any Validator<XYZ> declarations anywhere. That casts doubt on the wisdom of having that interface at all.
Please check the regex in name validator carefully. I think it may not work. What happens if you feed, “ ” to it?
All things are lawful, but not all things are profitable.
Junilu Lacar wrote:What the name should_accept_only_letters_and_space also does is it makes you think of special cases that you might have missed. Would it be acceptable to have a name like "A B C D E F G"? That kind of string will be accepted by the validator.
Prasanna Raman wrote:
Liutauras Vilda wrote:
Prasanna Raman wrote:
Which implementation you had in mind when created this interface?
PaySlipGeneratorApplication
Prasanna Raman wrote:
Liutauras Vilda wrote:
Prasanna Raman wrote:
Which implementation you had in mind when created this interface?
Sorry, I don't understand what you mean by which implementation?
Liutauras Vilda wrote:
PaySlipGeneratorApplication
As you see you pass the same variable 3 times: input, input, input to the same utility classe's methods.
Liutauras Vilda wrote:
Prasanna Raman wrote:
Liutauras Vilda wrote:
Prasanna Raman wrote:
Which implementation you had in mind when created this interface?
Sorry, I don't understand what you mean by which implementation?
Probably not everyone would find it important...
NameValidator you could relate well with interface's method parameter validate(T name), but for MonthlyPayslipFrequencyValidator when the input is really a frequency, argument "name" seems to be off. I'd have called it simply input in the interface's method's validate parameter.
Tom Joe wrote:Unrelated, but do you use version control like Git ? Is this code from a book ?
Liutauras Vilda wrote:Why PayslipFrequency enum has method generate()? That looks to me like incorrectly assigned responsibility.
Prasanna Raman wrote:Is that OK to do for tests? I know Java follows camel case.
Campbell Ritchie wrote:Where are you using that interface? I can't see any Validator<XYZ> declarations anywhere. That casts doubt on the wisdom of having that interface at all.
Campbell Ritchie wrote:Wouldn't it read something like this?
The City calls upon her steadfast protectors. Now for a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|