added getId

master
melvin 2011-07-01 11:33:59 +08:00
parent 253012a874
commit 3cdc5b968a
1 changed files with 12 additions and 0 deletions

View File

@ -57,4 +57,16 @@ public class MagicExcludeResult implements MagicMappable {
}
return buffer.toString();
}
@Override
public long getId() {
int idx = 0;
long[] input = new long[excludePermanents.size() + 1];
for (final MagicPermanent permanent : excludePermanents) {
input[idx] = permanent.getId();
idx++;
}
input[input.length - 1] = excludeFlags;
return magic.MurmurHash3.hash(input);
}
}