summaryrefslogtreecommitdiff
path: root/src/main/java/org/mamago/util/Cast.java
blob: 4ed3d47c8a7769d34b9d62ba22b256e51babbd04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package org.mamago.util;

public class Cast {
    // Prevent instantiation
    private Cast() {}

    public static byte asByte(int i) {
        // @Fixme[MA]: check whether casting give out-of-bounds check, otherwise add in for safety
        return (byte) i;
    }

    public static short asShort(int i) {
        // @Fixme[MA]: check whether casting give out-of-bounds check, otherwise add in for safety
        return (byte) i;
    }
}