Class DefaultFemaleStringExpressionSocket
- java.lang.Object
-
- jmri.jmrit.logixng.implementation.AbstractFemaleSocket
-
- jmri.jmrit.logixng.implementation.DefaultFemaleStringExpressionSocket
-
- All Implemented Interfaces:
PropertyChangeProvider
,Base
,FemaleSocket
,FemaleStringExpressionSocket
,StringExpression
public class DefaultFemaleStringExpressionSocket extends AbstractFemaleSocket implements FemaleStringExpressionSocket
Default implementation of the Female String Expression socket
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractFemaleSocket
_enableListeners, _listener
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
-
Constructor Summary
Constructors Constructor Description DefaultFemaleStringExpressionSocket(Base parent, FemaleSocketListener listener, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeMe()
java.lang.String
evaluate()
Evaluate this expression.java.util.Map<Category,java.util.List<java.lang.Class<? extends Base>>>
getConnectableClasses()
Get a set of classes that are compatible with this female socket.java.lang.String
getLongDescription(java.util.Locale locale)
Get a long description of this item.java.lang.String
getShortDescription(java.util.Locale locale)
Get a short description of this item.boolean
getTriggerOnChange()
Get whenether this expression should trigger the ConditionalNG if the named beans it listens to changes state.boolean
isCompatible(MaleSocket socket)
Is a particular male socket compatible with this female socket?void
setTriggerOnChange(boolean triggerOnChange)
Set whenether this expression should trigger the ConditionalNG if the named beans it listens to changes state.-
Methods inherited from class jmri.jmrit.logixng.implementation.AbstractFemaleSocket
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, connect, deepCopyChildren, disconnect, dispose, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getConnectedSocket, getDeepCopy, getEnableListeners, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getName, getNumPropertyChangeListeners, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getRoot, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isConnected, printTree, printTree, printTree, printTreeRow, registerListeners, registerListenersForThisClass, removePropertyChangeListener, removePropertyChangeListener, setComment, setEnableListeners, setName, setParent, setParentForAllChildren, setUserName, unregisterListeners, unregisterListenersForThisClass, updateListenerRef, validateName, vetoableChange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.Base
addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getLongDescription, getModule, getNumPropertyChangeListeners, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isEnabled, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParent, setParentForAllChildren, setUserName, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.jmrit.logixng.FemaleSocket
canDisconnect, connect, disconnect, doSocketOperation, getConnectedSocket, getEnableListeners, getName, isAncestor, isConnected, isSocketOperationAllowed, setEnableListeners, setName, setName, setup, validateName, validateName
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
DefaultFemaleStringExpressionSocket
public DefaultFemaleStringExpressionSocket(Base parent, FemaleSocketListener listener, java.lang.String name)
-
-
Method Detail
-
isCompatible
public boolean isCompatible(MaleSocket socket)
Is a particular male socket compatible with this female socket?- Specified by:
isCompatible
in interfaceFemaleSocket
- Parameters:
socket
- the male socket- Returns:
- true if the male socket can be connected to this female socket
-
evaluate
public java.lang.String evaluate() throws JmriException
Evaluate this expression.- Specified by:
evaluate
in interfaceStringExpression
- Returns:
- the result of the evaluation
- Throws:
JmriException
- when an exception occurs
-
getTriggerOnChange
public boolean getTriggerOnChange()
Get whenether this expression should trigger the ConditionalNG if the named beans it listens to changes state.- Specified by:
getTriggerOnChange
in interfaceStringExpression
- Returns:
- true if trigger on change, false otherwise
-
setTriggerOnChange
public void setTriggerOnChange(boolean triggerOnChange)
Set whenether this expression should trigger the ConditionalNG if the named beans it listens to changes state.- Specified by:
setTriggerOnChange
in interfaceStringExpression
- Parameters:
triggerOnChange
- true if trigger on change, false otherwise
-
getShortDescription
public java.lang.String getShortDescription(java.util.Locale locale)
Get a short description of this item.- Specified by:
getShortDescription
in interfaceBase
- Parameters:
locale
- The locale to be used- Returns:
- a short description
-
getLongDescription
public java.lang.String getLongDescription(java.util.Locale locale)
Get a long description of this item.- Specified by:
getLongDescription
in interfaceBase
- Parameters:
locale
- The locale to be used- Returns:
- a long description
-
getConnectableClasses
public java.util.Map<Category,java.util.List<java.lang.Class<? extends Base>>> getConnectableClasses()
Get a set of classes that are compatible with this female socket.- Specified by:
getConnectableClasses
in interfaceFemaleSocket
- Returns:
- a set of entries with category and class
-
disposeMe
public void disposeMe()
- Specified by:
disposeMe
in classAbstractFemaleSocket
-
-