io.api.etherscan.model.UncleBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-etherscan-api Show documentation
Show all versions of java-etherscan-api Show documentation
Library is a wrapper for EtherScan API.
package io.api.etherscan.model;
import io.api.etherscan.util.BasicUtils;
import java.util.List;
/**
* ! NO DESCRIPTION !
*
* @author GoodforGod
* @since 30.10.2018
*/
public class UncleBlock extends Block {
private String blockMiner;
private List uncles;
private String uncleInclusionReward;
//
public boolean isEmpty() {
return getBlockNumber() == 0 && getBlockReward() == null
&& getTimeStamp() == null
&& BasicUtils.isEmpty(blockMiner);
}
public String getBlockMiner() {
return blockMiner;
}
public List getUncles() {
return uncles;
}
public String getUncleInclusionReward() {
return uncleInclusionReward;
}
//
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
UncleBlock that = (UncleBlock) o;
return getBlockNumber() != 0 && getBlockNumber() == that.getBlockNumber();
}
@Override
public int hashCode() {
int result = super.hashCode();
result = (int) (31 * result + getBlockNumber());
return result;
}
@Override
public String toString() {
return "UncleBlock{" +
"blockMiner='" + blockMiner + '\'' +
", uncles=" + uncles +
", uncleInclusionReward='" + uncleInclusionReward + '\'' +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy