Package adams.flow.core
Class CallableNamesRecorder
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.core.CallableNamesRecorder
-
- All Implemented Interfaces:
LoggingSupporter,SizeOfHandler,Serializable
public class CallableNamesRecorder extends LoggingObject
Records callables to check for duplicates.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Set<String>>m_FullNamesthe full names recorded to so far (per parent full name of actor reference handler).protected Map<String,Set<String>>m_Namesthe names recorded so far (per parent full name of actor reference handler).-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description CallableNamesRecorder()Initializes the recorder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ActorHandler handler, Actor actor)Adds the name to the recorded ones.voidclear()Clears the recorded data.booleancontains(ActorHandler handler, Actor actor)Checks whether the name of the actor is already in use.protected StringgenerateKey(ActorHandler handler)Generates the key for the handler.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
clear
public void clear()
Clears the recorded data.
-
generateKey
protected String generateKey(ActorHandler handler)
Generates the key for the handler.- Parameters:
handler- the handler to generate the key for- Returns:
- the key
-
contains
public boolean contains(ActorHandler handler, Actor actor)
Checks whether the name of the actor is already in use.- Parameters:
handler- the handler for the actoractor- the actor to check- Returns:
- true if already in use
-
add
public void add(ActorHandler handler, Actor actor)
Adds the name to the recorded ones.- Parameters:
handler- the handler for the actoractor- the actor to add
-
-