com.taobao.api.internal.toplink.endpoint.DefaultIdentity Maven / Gradle / Ivy
package com.taobao.api.internal.toplink.endpoint;
import java.util.Map;
import com.taobao.api.internal.toplink.LinkException;
public class DefaultIdentity implements Identity {
private String name;
public String getName() {
return this.name;
}
public DefaultIdentity(String name) {
this.name = name;
}
@SuppressWarnings("unchecked")
public Identity parse(Object data) throws LinkException {
Map dict = (Map) data;
return new DefaultIdentity(dict.get("name"));
}
@SuppressWarnings("unchecked")
public void render(Object to) {
Map dict = (Map) to;
dict.put("name", this.name);
}
public boolean equals(Identity id) {
return id.getClass() == DefaultIdentity.class &&
this.name.equals(((DefaultIdentity) id).name);
}
@Override
public String toString() {
return this.name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy