| 8 | import java.util.List; |
| 9 | |
| 10 | public class Class { |
| 11 | |
| 12 | @SerializedName("type_id") |
| 13 | private String typeId; |
| 14 | @SerializedName("type_name") |
| 15 | private String typeName; |
| 16 | @SerializedName("type_flag") |
| 17 | private String typeFlag; |
| 18 | |
| 19 | public static List<Class> arrayFrom(String str) { |
| 20 | Type listType = TypeToken.getParameterized(List.class, Class.class).getType(); |
| 21 | return new Gson().fromJson(str, listType); |
| 22 | } |
| 23 | |
| 24 | public Class(String typeId) { |
| 25 | this(typeId, typeId); |
| 26 | } |
| 27 | |
| 28 | public Class(String typeId, String typeName) { |
| 29 | this(typeId, typeName, null); |
| 30 | } |
| 31 | |
| 32 | public Class(String typeId, String typeName, String typeFlag) { |
| 33 | this.typeId = typeId; |
| 34 | this.typeName = typeName; |
| 35 | this.typeFlag = typeFlag; |
| 36 | } |
| 37 | |
| 38 | public String getTypeId() { |
| 39 | return typeId; |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public boolean equals(Object obj) { |
| 44 | if (this == obj) return true; |
| 45 | if (!(obj instanceof Class)) return false; |
| 46 | Class it = (Class) obj; |
| 47 | return getTypeId().equals(it.getTypeId()); |
| 48 | } |
| 49 | } |
nothing calls this directly
no outgoing calls
no test coverage detected