Package org.smooks.engine.bean.context
Class DefaultBeanIdStore
- java.lang.Object
-
- org.smooks.engine.bean.context.DefaultBeanIdStore
-
- All Implemented Interfaces:
org.smooks.api.bean.context.BeanIdStore
public class DefaultBeanIdStore extends Object implements org.smooks.api.bean.context.BeanIdStore
-
-
Constructor Summary
Constructors Constructor Description DefaultBeanIdStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsBeanId(String beanId)org.smooks.api.bean.repository.BeanIdgetBeanId(String beanId)Map<String,org.smooks.api.bean.repository.BeanId>getBeanIdMap()Returns a copy of the internal bean id maporg.smooks.api.bean.repository.BeanIdregister(String beanIdName)registers a beanId name and returns theBeanIdobject.intsize()
-
-
-
Method Detail
-
register
public org.smooks.api.bean.repository.BeanId register(String beanIdName)
registers a beanId name and returns theBeanIdobject. 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:
registerin interfaceorg.smooks.api.bean.context.BeanIdStore- Returns:
- A new or existing BeanId.
-
getBeanId
public org.smooks.api.bean.repository.BeanId getBeanId(String beanId)
- Specified by:
getBeanIdin interfaceorg.smooks.api.bean.context.BeanIdStore- Returns:
- The BeanId or
nullif it is not registered;
-
containsBeanId
public boolean containsBeanId(String beanId)
- Specified by:
containsBeanIdin interfaceorg.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:
getBeanIdMapin interfaceorg.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:
sizein interfaceorg.smooks.api.bean.context.BeanIdStore- Returns:
- the current index size.
-
-