a.ArrayElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaee-rt Show documentation
Show all versions of javaee-rt Show documentation
An Execution Environment for Java SCOREs
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