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

a.ArrayElement Maven / Gradle / Ivy

There is a newer version: 0.9.6
Show newest version
package a;

public enum ArrayElement {

    // Integral type
    BYTE(1),
    SHORT(2),
    INT(4),
    LONG(8),
    CHAR(2),

    // Floating-point type
    FLOAT(4),
    DOUBLE(8),

    // Reference type
    REF(8);

    static final int COST_PER_BYTE = 3;

    private final int energy;

    ArrayElement(int size) {
        this.energy = size * COST_PER_BYTE;
    }

    public int getEnergy() {
        return energy;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy