how can I access these fields from a switch in a different class? I need to do a switch case for each LocationType.
@FunctionalInterface
public interface LocationType {
LocationType UNKNOWN = () -> "Unknown Location";
LocationType MERGE = () -> "Merge Location";
LocationType REGULAR = () -> "Regular Location";
LocationType MULTI = () -> "Multi Location";
LocationType ZONE = () -> "Zone Location";
String getName();
}
e.g. what I need to do later on, in another class is this:
switch (locationList) {
case LocationType.MERGE:
break;
case LocationType.MULTI:
break;
}