4k4xs4pH1r3 / artemisa

Undocumented declaration found JAVA-D1003
Documentation
Minor
5 months ago6 months old
 4import java.util.HashMap;
 5import java.util.Map;
 6
 7public enum MimeType  8{ 9     PNG("image/png"),10     JPEG("image/jpeg"),11     PDF("application/pdf"),12     SVG("image/svg+xml");13     14     private static final Map<String,MimeType> lookup 15          = new HashMap<String,MimeType>();16     17     static {18          for(MimeType m : EnumSet.allOf(MimeType.class))19               lookup.put(m.getType(), m);20     }     21     22     private String type;23        		  24     private MimeType(String type) {25          this.type = type;26     }2728     public String getType() { return type; }2930     public static MimeType get(String type) {31    	  32          return lookup.get(type); 33     }34}