class ShardLocation {
    final ShardId shardId;
    final String nodeId;

    public ShardLocation(ShardId shardId, String nodeId) {
        this.shardId = shardId;
        this.nodeId = nodeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ShardLocation that = (ShardLocation) o;

        if (!shardId.equals(that.shardId)) return false;
        return nodeId != null ? nodeId.equals(that.nodeId) : that.nodeId == null;
    }

    @Override
    public int hashCode() {<FILL_FUNCTION_BODY>}

}

        int result = shardId.hashCode();
        result = 31 * result + (nodeId != null ? nodeId.hashCode() : 0);
        return result;
    
<no_super_class>