package me.xdrop.ensurej;

import me.xdrop.ensurej.checks.CheckInt;

public class IntegerHandler extends Handler<IntegerHandler> {

    private int a;

    public IntegerHandler(int a) {
        this.a = a;
    }

    public Chain<Integer, IntegerHandler> isPositive(){
        return create(CheckInt.isPositive(), a, "");
    }

    public Chain<Integer, IntegerHandler> isNegative(){
        return create(CheckInt.isNegative(), a, "");
    }

    public Chain<Integer, IntegerHandler> inRange(int lower, int upper){
        return create(CheckInt.inRange(lower, upper), a, "");
    }

}

@@ -304,36 +304,60 @@
 Positive(), a, %22
+Positive number expected
 %22);%0A
-
     %7D%0A%0A    publi
@@ -448,24 +448,48 @@
 tive(), a, %22
+Negative number expected
 %22);%0A    %7D%0A%0A 
@@ -560,16 +560,16 @@
 upper)%7B%0A
-
         
@@ -618,16 +618,39 @@
 r), a, %22
+Number was not in range
 %22);%0A    

Add error messages