MCPcopy Create free account
hub / github.com/Teneted/Tenet / hashCode

Method hashCode

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

Source from the content-addressed store, hash-verified

311 }
312
313 @Override
314 @Utility
315 public int hashCode() {
316 int hash = 1;
317
318 hash = hash * 31 + getType().hashCode();
319 hash = hash * 31 + getAmount();
320 hash = hash * 31 + (getDurability() & 0xffff);
321 hash = hash * 31 + (hasItemMeta() ? (meta == null ? getItemMeta().hashCode() : meta.hashCode()) : 0);
322
323 return hash;
324 }
325
326 /**
327 * Checks if this ItemStack contains the given {@link Enchantment}

Callers

nothing calls this directly

Calls 5

getTypeMethod · 0.95
getAmountMethod · 0.95
getDurabilityMethod · 0.95
hasItemMetaMethod · 0.95
getItemMetaMethod · 0.95

Tested by

no test coverage detected