How does \Magento\Eav\Model\Entity\Attribute\AbstractAttribute::isInSet() work?

Context: How does \Magento\Eav\Model\Entity\AbstractEntity::getSortedAttributes() work?