Class DefaultBeanIdStore

  • All Implemented Interfaces:
    org.smooks.api.bean.context.BeanIdStore

    public class DefaultBeanIdStore
    extends Object
    implements org.smooks.api.bean.context.BeanIdStore
    • Constructor Detail

      • DefaultBeanIdStore

        public DefaultBeanIdStore()
    • Method Detail

      • register

        public org.smooks.api.bean.repository.BeanId register​(String beanIdName)
        registers a beanId name and returns the BeanId object. If the beanId name is already registered then belonging BeanId is returned.

        This method doesn't have a performance penalty anymore when then BeanId already exists.

        Specified by:
        register in interface org.smooks.api.bean.context.BeanIdStore
        Returns:
        A new or existing BeanId.
      • getBeanId

        public org.smooks.api.bean.repository.BeanId getBeanId​(String beanId)
        Specified by:
        getBeanId in interface org.smooks.api.bean.context.BeanIdStore
        Returns:
        The BeanId or null if it is not registered;
      • containsBeanId

        public boolean containsBeanId​(String beanId)
        Specified by:
        containsBeanId in interface org.smooks.api.bean.context.BeanIdStore
        Returns:
        if the bean Id name is already registered.
      • getBeanIdMap

        public Map<String,​org.smooks.api.bean.repository.BeanId> getBeanIdMap()
        Returns a copy of the internal bean id map
        Specified by:
        getBeanIdMap in interface org.smooks.api.bean.context.BeanIdStore
        Returns:
        An map where the key is the string based beanId and the value is the BeanId.
      • size

        public int size()
        Specified by:
        size in interface org.smooks.api.bean.context.BeanIdStore
        Returns:
        the current index size.