/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getVotes()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getVotes()).toHashCode(); }
/** * {@inheritDoc} */ public final String toString() { final StringBuffer b = new StringBuffer(); b.append(BEGIN); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); b.append(getProperties()); b.append(votes); b.append(END); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); return b.toString(); }
/** * {@inheritDoc} */ public final String toString() { final StringBuffer b = new StringBuffer(); b.append(BEGIN); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); b.append(getProperties()); b.append(votes); b.append(END); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); return b.toString(); }
/** * {@inheritDoc} */ public final void validate(final boolean recurse) throws ValidationException { /* * ; 'last-mod' and 'voter' are optional, but MUST NOT occur more than once */ PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.VOTER, getProperties()); /* * ; the following is optional, ; and MAY occur more than once x-prop */ if (recurse) { validateProperties(); } }
/** * {@inheritDoc} */ public final void validate(final boolean recurse) throws ValidationException { /* Dtstamp and Voter are required once only */ PropertyValidator.getInstance().assertOne(Property.DTSTAMP, getProperties()); PropertyValidator.getInstance().assertOne(Property.VOTER, getProperties()); /* * ; 'last-mod' and '?' are optional, but MUST NOT occur more than once */ PropertyValidator.getInstance().assertOneOrLess(Property.LAST_MODIFIED, getProperties()); /* * ; the following is optional, ; and MAY occur more than once x-prop */ if (recurse) { validateProperties(); } }