@return the primitive type specified by specific name. @throws IllegalArgumentException if given name is irrelevant to any primitive type.
(String name)
| 59 | * @throws IllegalArgumentException if given name is irrelevant to any primitive type. |
| 60 | */ |
| 61 | public static PrimitiveType get(String name) { |
| 62 | for (PrimitiveType t : values()) { |
| 63 | if (t.name.equals(name)) { |
| 64 | return t; |
| 65 | } |
| 66 | } |
| 67 | throw new IllegalArgumentException(name + " is not primitive type"); |
| 68 | } |
| 69 | |
| 70 | @Override |
| 71 | public String getName() { |
no test coverage detected