MCPcopy Create free account
hub / github.com/Bukkit/Bukkit / hashCode

Method hashCode

src/main/java/org/bukkit/inventory/ItemStack.java:207–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205 }
206
207 @Override
208 public int hashCode() {
209 int hash = 11;
210
211 hash = hash * 19 + 7 * getTypeId(); // Overriding hashCode since equals is overridden, it's just
212 hash = hash * 7 + 23 * getAmount(); // too bad these are mutable values... Q_Q
213 return hash;
214 }
215
216 public Map<String, Object> serialize() {
217 Map<String, Object> result = new LinkedHashMap<String, Object>();

Callers

nothing calls this directly

Calls 2

getTypeIdMethod · 0.95
getAmountMethod · 0.95

Tested by

no test coverage detected