@Override public boolean equals(final Object o) { if (!(o instanceof ItemInformation)) { return false; } final ItemInformation i = (ItemInformation) o; return i.getItemId() == this.getItemId(); }
public static int getUnnoteId(final int id) { ItemInformation i = get(id); if (i != null) { if (i instanceof MultiItemInformation) { i = ((MultiItemInformation) i).getItem(id); if (i == null) return id; } return i.getItemId(); } return id; }
public static void putInfo(final ItemInformation i) { final ItemInformation cur = info.get(i.getItemId()); if (cur == null || i.canNote() && !cur.canNote()) { putInfo(i.getItemId(), i); if (i.canNote()) putInfo(i.getNotedId(), i); } }