HashSet<String> set = new HashSet<String>();
for (String s : options.mentions) {
if (!set.contains(s)) {
set.add(s); // prevent duplicates
entry.addCategory(Common.MENTION_URN, s, "Mention");
stampElement = entry.addExtension(new QName(
Common.NS_URI, Common.STAMP));
stampElement.setText(Crypto.computeStamp(
Common.STAMP_BITS,
entry.getUpdated().getTime(), s));
// stamp is required for each mention