I have I quick question, say I have this class:
public enum Files {
FILE_A, FILE_B;
}
Now FILE_A is a "Files", but being a "File" would be more intuitive. To example, when using a foreach, I need to use something like this:
for (Files file : Files.values()) {
}
Where File would be better(in my opinion). Is there a way of calling objects of a class different than the class itself? Like calling object of the class/enum "Files" "File". With classes I had the idea to do something like this:
public class A extends B {
public static final FILE_A;
}
public class B {
}
Now every A is also a B, but that is not a clean way and doesn't work with enums. Is there another way?