All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functionalj.lens.TheInteger Maven / Gradle / Ivy

There is a newer version: 1.0.17
Show newest version
package functionalj.lens;

import functionalj.lens.lenses.IntegerToIntegerAccessPrimitive;

public class TheInteger implements IntegerToIntegerAccessPrimitive {
    
    public static final TheInteger theInteger = new TheInteger();
    
    public int sum(int i1, int i2) {
        return i1 + i2;
    }
    
    public int product(int i1, int i2) {
        return i1 * i2;
    }
    
    public int subtract(int i1, int i2) {
        return i1 - i2;
    }
    
    public int diff(int i1, int i2) {
        return i2 - i1;
    }
    
    public int ratio(int i1, int i2) {
        return i1 / i2;
    }
    
    @Override
    public int applyIntToInt(int host) {
        return host;
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy