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

org.reactfx.util.AccumulatorSize Maven / Gradle / Ivy

There is a newer version: 1.11
Show newest version
package org.reactfx.util;

public enum AccumulatorSize {
    ZERO, ONE, MANY;

    public static AccumulatorSize fromInt(int n) {
        if(n < 0) {
            throw new IllegalArgumentException("Size cannot be negative: " + n);
        } else switch(n) {
            case 0: return ZERO;
            case 1: return ONE;
            default: return MANY;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy