FENGMI蜂蜜影视 原始JAR及配置
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
1.2 KiB

package com.github.catvod.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.List;
public class Class {
@SerializedName("type_id")
private String typeId;
@SerializedName("type_name")
private String typeName;
@SerializedName("type_flag")
private String typeFlag;
public static List<Class> arrayFrom(String str) {
Type listType = new TypeToken<List<Class>>() {}.getType();
return new Gson().fromJson(str, listType);
}
public Class(String typeId) {
this(typeId, typeId);
}
public Class(String typeId, String typeName) {
this(typeId, typeName, null);
}
public Class(String typeId, String typeName, String typeFlag) {
this.typeId = typeId;
this.typeName = typeName;
this.typeFlag = typeFlag;
}
public String getTypeId() {
return typeId;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof Class)) return false;
Class it = (Class) obj;
return getTypeId().equals(it.getTypeId());
}
}