What would be the most efficent to check if something is on a list of enums? I’ve looked around for a while and it wasn’t very clear. Arrays don’t have a contains() function and hashmaps are key:value.
Something like:
if(enumlist.contains(foo.enum())){
// Do something
}
Use
List#indexOf().Alternately, you can use the (extremely efficient)
EnumSetdata structure to store the objects — if you’re okay with not being able to store duplicate elements.