package com.casic.missiles.dto; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.casic.missiles.core.es.HitResponse; import java.util.ArrayList; import java.util.List; public class EsResponse<T> { private HitResponse<T> hits; public List<T> getDatas() { List<T> datas = new ArrayList(); if (ObjectUtils.isEmpty(this.hits)) { return datas; } else { for (int i = 0; i < this.hits.getHits().size(); ++i) { datas.add((this.hits.getHits().get(i)).getData()); } return datas; } } public EsResponse() { } public HitResponse<T> getHits() { return this.hits; } public void setHits(HitResponse<T> hits) { this.hits = hits; } @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof com.casic.missiles.core.es.EsResponse)) { return false; } else { EsResponse<?> other = (EsResponse) o; if (!other.canEqual(this)) { return false; } else { Object this$hits = this.getHits(); Object other$hits = other.getHits(); if (this$hits == null) { if (other$hits != null) { return false; } } else if (!this$hits.equals(other$hits)) { return false; } return true; } } } protected boolean canEqual(Object other) { return other instanceof com.casic.missiles.core.es.EsResponse; } @Override public int hashCode() { Boolean PRIME = true; int result = 1; Object $hits = this.getHits(); result = result * 59 + ($hits == null ? 43 : $hits.hashCode()); return result; } @Override public String toString() { return "EsResponse(hits=" + this.getHits() + ")"; } }