package com.github.brunodles.validationbuilder.matcher;

import java.util.function.IntConsumer;

/**
 * Created by bruno on 03/06/16.
 */
public class When {

    private IntConsumer adder;

    public When(IntConsumer adder) {
        this.adder = adder;
    }

    public StringMatcher when(String s) {
        return new StringMatcher(s, adder);
    }

    public IntegerMatcher when(Integer i) {
        return new IntegerMatcher(i, adder);
    }

    public <T> ObjectMatcher<T, ?> when(final T object) {
        return new ObjectMatcherImpl<T>(object, adder);
    }
}

@@ -437,32 +437,302 @@
  adder);%0A    %7D%0A%0A
+    public LongMatcher when(Long i) %7B%0A        return new LongMatcher(i, adder);%0A    %7D%0A%0A    public FloatMatcher when(Float i) %7B%0A        return new FloatMatcher(i, adder);%0A    %7D%0A%0A    public DoubleMatcher when(Double i) %7B%0A        return new DoubleMatcher(i, adder);%0A    %7D%0A%0A
     public %3CT%3E O

Update when to include more matchers