Code example for BigInteger

Methods: compareTo

        return height;
    /** Returns true if this objects chainWork is higher than the others. */ 
    public boolean moreWorkThan(StoredBlock other) {
        return chainWork.compareTo(other.chainWork) > 0;
    public boolean equals(Object other) {
        if (!(other instanceof StoredBlock)) return false;
        StoredBlock o = (StoredBlock) other;
        return o.header.equals(header) && o.chainWork.equals(chainWork) && o.height == height;
    public int hashCode() { 
        // A better hashCode is possible, but this works for now. 
        return header.hashCode() ^ chainWork.hashCode() ^ height;
Stop searching for code, let great code find you!  Add Codota to your java IDE