Package org.smooks.engine.bean.context
Class DefaultBeanIdStore
- java.lang.Object
-
- org.smooks.engine.bean.context.DefaultBeanIdStore
-
- All Implemented Interfaces:
BeanIdStore
public class DefaultBeanIdStore extends Object implements BeanIdStore
-
-
Constructor Summary
Constructors Constructor Description DefaultBeanIdStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsBeanId(String beanId)
BeanId
getBeanId(String beanId)
Map<String,BeanId>
getBeanIdMap()
Returns a copy of the internal bean id mapBeanId
register(String beanIdName)
registers a beanId name and returns theBeanId
object.int
size()
-
-
-
Method Detail
-
register
public BeanId register(String beanIdName)
registers a beanId name and returns theBeanId
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 interfaceBeanIdStore
- Returns:
- A new or existing BeanId.
-
getBeanId
public BeanId getBeanId(String beanId)
- Specified by:
getBeanId
in interfaceBeanIdStore
- Returns:
- The BeanId or
null
if it is not registered;
-
containsBeanId
public boolean containsBeanId(String beanId)
- Specified by:
containsBeanId
in interfaceBeanIdStore
- Returns:
- if the bean Id name is already registered.
-
getBeanIdMap
public Map<String,BeanId> getBeanIdMap()
Returns a copy of the internal bean id map- Specified by:
getBeanIdMap
in interfaceBeanIdStore
- 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 interfaceBeanIdStore
- Returns:
- the current index size.
-
-