/** * clears the internal mapper - be sure, to remap everything before going on */ public void clearTypeInstance() { getTypeInstanceCache().clear(); }
/** * gets the TypeInstance remembered within the FastAdapter for an item * * @param type the int type of the item * @return the Item typeInstance */ public Item getTypeInstance(int type) { return getTypeInstanceCache().get(type); }
/** * register a new type into the TypeInstances to be able to efficiently create thew ViewHolders * * @param item an IItem which will be shown in the list */ @SuppressWarnings("unchecked") public void registerTypeInstance(Item item) { if (getTypeInstanceCache().register(item)) { //check if the item implements hookable when its added for the first time if (item instanceof IHookable) { withEventHooks(((IHookable<Item>) item).getEventHooks()); } } }