private boolean hasItem(final String itemId) { boolean hasItem = false; for (final Item item : getEquipment()) { hasItem |= itemId.equals(item.getId()); } return hasItem; }
@Override public boolean equals(final Object obj) { if (obj instanceof String) { return id.equals(obj); } else if (obj instanceof Item) { final Item other = (Item) obj; return other.getId().equals(id); } return false; }