class HashUID extends UID {

    @Override
    public int compareTo(final UID uid) {
        int result;
        if (uid instanceof HashUID) {
            final HashUID o = (HashUID) uid;
            final CompareToBuilder compare = new CompareToBuilder();
            compare.append(this.optionalPrefix, o.optionalPrefix);
            compare.append(this.h1, o.h1);
            compare.append(this.h2, o.h2);
            compare.append(this.time, o.time);
            compare.append(this.extra, o.extra);
            result = compare.toComparison();
        } else if (null != uid) {
            result = toString().compareTo(uid.toString());
        } else {
            result = -1;
        }
        
        return result;
    }

    protected  HashUID();
    protected  HashUID(final byte[] data, final Date time);
    protected  HashUID(final byte[] data, final Date time, final String... extras);
    protected  HashUID(final HashUID template, final String... extras);
    private  HashUID(final String optionalPrefix, int h1, int h2, int time, final String... extras);
    private  HashUID(final String optionalPrefix, int h1, int h2, int time);

}