convenient helper method to get the Item from a holder via the defined tag

@param holder the ViewHolder for which we want to retrieve the item
@return the Item found for the given position and that ViewHolder
179405
@SuppressWarnings("unchecked")
    public static <Item extends IItem> Item getHolderAdapterItemTag(@Nullable RecyclerView.ViewHolder holder) {
        if (holder != null) {
            Object item = holder.itemView.getTag(com.mikepenz.fastadapter.R.id.fastadapter_item);
            if (item instanceof IItem) {
                return (Item) item;
            }
        }
        return null;
    }
303514
public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) {
        AdapterDelegate<T> delegate = getDelegateForViewType(holder.getItemViewType());
        if (delegate == null) {
            throw new NullPointerException("No delegate found for "
                    + holder
                    + " for item at position = "
                    + holder.getAdapterPosition()
                    + " for viewType = "
                    + holder.getItemViewType());
        }
        delegate.onViewRecycled(holder);
    }
580235
public Tag get(int theIndex) {
		if (myOrderedTags == null) {
			myOrderedTags = new ArrayList<Tag>();
			for (Tag next : myTagSet) {
				myOrderedTags.add(next);
			}
		}
		return myOrderedTags.get(theIndex);
	}
234282
private Holder createHolder() {
        poll();
        Holder holder = new Holder(queue);
        WeakReference<Holder> ref = new WeakReference<>(holder);

        Holder old;
        do {
            old = strongRefs;
            holder.next = old;
        } while (!strongRefsUpdater.compareAndSet(this, old, holder));

        local.set(ref);
        return holder;
    }
197786
public static List<String> getPropertyValues( AbstractBlockHolder holder, String propertyName ) {

		List<String> result = new ArrayList<> ();
		for( BlockProperty p : holder.findPropertiesBlockByName( propertyName )) {
			result.addAll( Utils.splitNicely( p.getValue(), ParsingConstants.PROPERTY_SEPARATOR ));
		}

		return result;
	}
118387
protected boolean add(Object socketOrChannel, final ItemHolder holder)
    {
        if (socketOrChannel == null) {
            Socket socket = holder.socket();
            SelectableChannel ch = holder.item().getRawSocket();
            if (ch == null) {
                // not a channel
                assert (socket != null);
                socketOrChannel = socket;
            }
            else if (socket == null) {
                // not a socket
                socketOrChannel = ch;
            }
        }
        assert (socketOrChannel != null);

        CompositePollItem aggregate = items.get(socketOrChannel);
        if (aggregate == null) {
            aggregate = new CompositePollItem(socketOrChannel);
            items.put(socketOrChannel, aggregate);
        }
        final boolean rc = aggregate.holders.add(holder);
        if (rc) {
            all.add(aggregate);
        }
        return rc;
    }
1070556
@Override
    public void unBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
        IItem item = FastAdapter.getHolderAdapterItemTag(viewHolder);
        if (item != null) {
            item.unbindView(viewHolder);
            if (viewHolder instanceof FastAdapter.ViewHolder) {
                ((FastAdapter.ViewHolder) viewHolder).unbindView(item);
            }
            //remove set tag's
            viewHolder.itemView.setTag(R.id.fastadapter_item, null);
            viewHolder.itemView.setTag(R.id.fastadapter_item_adapter, null);
        } else {
            Log.e("FastAdapter", "The bindView method of this item should set the `Tag` on its itemView (https://github.com/mikepenz/FastAdapter/blob/develop/library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java#L189)");
        }
    }
1319303
public static <Item extends IItem> void attachToView(final EventHook<Item> event, final RecyclerView.ViewHolder viewHolder, View view) {
        if (event instanceof ClickEventHook) {
            view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    //get the adapter for this view
                    Object tagAdapter = viewHolder.itemView.getTag(R.id.fastadapter_item_adapter);
                    if (tagAdapter instanceof FastAdapter) {
                        FastAdapter<Item> adapter = (FastAdapter<Item>) tagAdapter;
                        //we get the adapterPosition from the viewHolder
                        int pos = adapter.getHolderAdapterPosition(viewHolder);
                        //make sure the click was done on a valid item
                        if (pos != RecyclerView.NO_POSITION) {
                            Item item = adapter.getItem(pos);
                            if (item != null) {
                                //we update our item with the changed property
                                ((ClickEventHook<Item>) event).onClick(v, pos, adapter, item);
                            }
                        }
                    }
                }
            });
        } else if (event instanceof LongClickEventHook) {
            view.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View v) {
                    //get the adapter for this view
                    Object tagAdapter = viewHolder.itemView.getTag(R.id.fastadapter_item_adapter);
                    if (tagAdapter instanceof FastAdapter) {
                        FastAdapter<Item> adapter = (FastAdapter<Item>) tagAdapter;
                        //we get the adapterPosition from the viewHolder
                        int pos = adapter.getHolderAdapterPosition(viewHolder);
                        //make sure the click was done on a valid item
                        if (pos != RecyclerView.NO_POSITION) {
                            Item item = adapter.getItem(pos);
                            if (item != null) {
                                //we update our item with the changed property
                                return ((LongClickEventHook<Item>) event).onLongClick(v, pos, adapter, item);
                            }
                        }
                    }
                    return false;
                }
            });
        } else if (event instanceof TouchEventHook) {
            view.setOnTouchListener(new View.OnTouchListener() {
                @Override
                public boolean onTouch(View v, MotionEvent e) {
                    //get the adapter for this view
                    Object tagAdapter = viewHolder.itemView.getTag(R.id.fastadapter_item_adapter);
                    if (tagAdapter instanceof FastAdapter) {
                        FastAdapter<Item> adapter = (FastAdapter<Item>) tagAdapter;
                        //we get the adapterPosition from the viewHolder
                        int pos = adapter.getHolderAdapterPosition(viewHolder);
                        //make sure the click was done on a valid item
                        if (pos != RecyclerView.NO_POSITION) {
                            Item item = adapter.getItem(pos);
                            if (item != null) {
                                //we update our item with the changed property
                                return ((TouchEventHook<Item>) event).onTouch(v, e, pos, adapter, item);
                            }
                        }
                    }
                    return false;
                }
            });
        } else if (event instanceof CustomEventHook) {
            //we trigger the event binding
            ((CustomEventHook<Item>) event).attachEvent(view, viewHolder);
        }
    }
27268
public int getPosition(Item item) {
        if (item.getIdentifier() == -1) {
            Log.e("FastAdapter", "You have to define an identifier for your item to retrieve the position via this method");
            return -1;
        }
        return getPosition(item.getIdentifier());
    }
393150
private void refreshLeftTopHeaderViewHolder(ViewHolder holder) {
        int left = calculateRowHeadersLeft();
        if (isRTL())
            left += mSettings.getCellMargin();

        int top = mSettings.isHeaderFixed() ? 0 : -mState.getScrollY();
        View view = holder.getItemView();

        int leftMargin = isRTL() ? 0 : mSettings.getCellMargin();
        int topMargin = mSettings.getCellMargin();

        view.layout(left + leftMargin,
                top + topMargin,
                left + mManager.getHeaderRowWidth() + leftMargin,
                top + mManager.getHeaderColumnHeight() + topMargin);
    }
164218
public static void useSurrogateHolder(SMailCallbackContextHolder holder) {
        assertNotLocked();
        if (_log.isInfoEnabled()) {
            _log.info("...Setting surrogate holder for callback context: " + holder);
        }
        if (holder != null) {
            _holder = holder;
        } else {
            _holder = _defaultHolder;
        }
        _locked = true;
    }
196659
@Deprecated
    protected void bindViewHolder(@NonNull T t, @NonNull H h, @NonNull Holder holder) {
    }
890405
public static String getPropertyValue( AbstractBlockHolder holder, String propertyName ) {
		BlockProperty p = holder.findPropertyBlockByName( propertyName );
		return p == null ? null : p.getValue();
	}
940876
@Override
    public void onViewRecycled(RecyclerView.ViewHolder holder) {
        if (mVerbose) Log.v(TAG, "onViewRecycled: " + holder.getItemViewType());
        super.onViewRecycled(holder);
        mOnBindViewHolderListener.unBindViewHolder(holder, holder.getAdapterPosition());
    }
1281388
public CmsListItem getItem(String id) {

        Iterator<CmsListItem> it = getAllContent().iterator();
        while (it.hasNext()) {
            CmsListItem item = it.next();
            if (item.getId().equals(id)) {
                return item;
            }
        }
        return null;
    }
932982
public function attachTags(&$holders)
    {
        $tagHolders = $holders instanceof HoldsTags ? [$holders] : $holders;

        if (!$holder = $this->findFirst($tagHolders)) {
            return $this;
        }

        $resourceName = $holder->resourceName();

        if (!$tags = $this->tagsByForeignId($this->collectIds($tagHolders), $resourceName)) {
            return $this;
        }

        foreach ($tagHolders as $holder) {
            $foreignId = $holder->getKey();
            if (!isset($tags[$foreignId])) {
                continue;
            }
            foreach ($tags[$foreignId] as $tag) {
                $holder->attachTag($tag);
            }
        }
        return $this;
    }
490781
protected Iterable<ItemHolder> items(final Object socketOrChannel)
    {
        final CompositePollItem aggregate = items.get(socketOrChannel);
        if (aggregate == null) {
            return Collections.emptySet();
        }
        return aggregate.holders;
    }