com.crashinvaders.basisu.wrapper.UniqueIdUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of basisu-wrapper Show documentation
Show all versions of basisu-wrapper Show documentation
Java wrapper for Basis Universal texture transcoder native code.
The newest version!
package com.crashinvaders.basisu.wrapper;
public class UniqueIdUtils {
static T findOrThrow(T[] values, int id) {
for (int i = 0; i < values.length; i++) {
if (values[i].getId() == id) {
return values[i];
}
}
throw new IllegalArgumentException("Cannot find an enum value with ID: " + id);
}
public interface UniqueIdValue {
int getId();
}
}