Class DefaultFemaleGenericExpressionSocket
java.lang.Object
jmri.jmrit.logixng.implementation.AbstractFemaleSocket
jmri.jmrit.logixng.implementation.DefaultFemaleGenericExpressionSocket
- All Implemented Interfaces:
PropertyChangeProvider,Base,FemaleGenericExpressionSocket,FemaleSocket,FemaleSocketListener
public class DefaultFemaleGenericExpressionSocket
extends AbstractFemaleSocket
implements FemaleGenericExpressionSocket, FemaleSocketListener
Default implementation of the FemaleGenericExpressionSocket
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowExceptionNested classes/interfaces inherited from interface jmri.jmrit.logixng.FemaleGenericExpressionSocket
FemaleGenericExpressionSocket.SocketType -
Field Summary
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractFemaleSocket
_enableListeners, _listenerFields 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
ConstructorsConstructorDescriptionDefaultFemaleGenericExpressionSocket(FemaleGenericExpressionSocket.SocketType socketType, Base parent, FemaleSocketListener listener, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(MaleSocket socket) Connect the male socket to this female socket.voidconnected(FemaleSocket socket) The socket is connected.voidDisconnect the current connected male socket from this female socket.voiddisconnected(FemaleSocket socket) The socket is disconnected.voidEvaluate this expression.Get a set of classes that are compatible with this female socket.Get the connected socket.Get the current active socket.booleangetLongDescription(Locale locale) Get a long description of this item.getShortDescription(Locale locale) Get a short description of this item.Get the type of the socket.booleanisCompatible(MaleSocket socket) Is a particular male socket compatible with this female socket?booleanIs a male socket connected to this female socket?voidsetDoI18N(boolean do_i18n) voidSet the type of the socket.Methods inherited from class jmri.jmrit.logixng.implementation.AbstractFemaleSocket
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getEnableListeners, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getName, getNumPropertyChangeListeners, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getRoot, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, printTree, printTree, printTree, printTreeRow, registerListeners, registerListenersForThisClass, removePropertyChangeListener, removePropertyChangeListener, setComment, setEnableListeners, setName, setParent, setParentForAllChildren, setUserName, unregisterListeners, unregisterListenersForThisClass, updateListenerRef, validateName, vetoableChangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, vetoableChangeMethods inherited from interface jmri.jmrit.logixng.FemaleSocket
canDisconnect, doSocketOperation, getEnableListeners, getName, isAncestor, isSocketOperationAllowed, setEnableListeners, setName, setName, setup, validateName, validateNameMethods inherited from interface jmri.jmrit.logixng.FemaleSocketListener
socketNameChangedMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
DefaultFemaleGenericExpressionSocket
public DefaultFemaleGenericExpressionSocket(FemaleGenericExpressionSocket.SocketType socketType, Base parent, FemaleSocketListener listener, String name)
-
-
Method Details
-
getCurrentActiveSocket
Get the current active socket.- Specified by:
getCurrentActiveSocketin interfaceFemaleGenericExpressionSocket- Returns:
- the currently active socket or null if no socket is active
-
isCompatible
Is a particular male socket compatible with this female socket?- Specified by:
isCompatiblein interfaceFemaleSocket- Parameters:
socket- the male socket- Returns:
- true if the male socket can be connected to this female socket
-
setSocketType
public void setSocketType(FemaleGenericExpressionSocket.SocketType socketType) throws SocketAlreadyConnectedException Set the type of the socket.- Specified by:
setSocketTypein interfaceFemaleGenericExpressionSocket- Parameters:
socketType- the type of socket.- Throws:
SocketAlreadyConnectedException- if the socket is already connected and if the new type doesn't match the currently connected socket.
-
getSocketType
Get the type of the socket.- Specified by:
getSocketTypein interfaceFemaleGenericExpressionSocket- Returns:
- the type of socket
-
setDoI18N
-
getDoI18N
-
evaluateGeneric
Description copied from interface:FemaleGenericExpressionSocketEvaluate this expression.This method validates the expression without doing any convertation of the return value.
The parameter isCompleted is used if the expression should be evaluated more than once. For example, the Count expression is not completed until its child expression has been true and false a number of times.
- Specified by:
evaluateGenericin interfaceFemaleGenericExpressionSocket- Returns:
- the result of the evaluation. This is of the same class as parentValue.
- Throws:
JmriException- when an exception occurs
-
getShortDescription
Get a short description of this item.- Specified by:
getShortDescriptionin interfaceBase- Parameters:
locale- The locale to be used- Returns:
- a short description
-
getLongDescription
Get a long description of this item.- Specified by:
getLongDescriptionin interfaceBase- Parameters:
locale- The locale to be used- Returns:
- a long description
-
getConnectableClasses
Description copied from interface:FemaleSocketGet a set of classes that are compatible with this female socket.- Specified by:
getConnectableClassesin interfaceFemaleSocket- Returns:
- a set of entries with category and class
-
connect
Connect the male socket to this female socket.- Specified by:
connectin interfaceFemaleSocket- Overrides:
connectin classAbstractFemaleSocket- Parameters:
socket- the socket to connect- Throws:
SocketAlreadyConnectedException- if the socket is already connected
-
disconnect
Disconnect the current connected male socket from this female socket.- Specified by:
disconnectin interfaceFemaleSocket- Overrides:
disconnectin classAbstractFemaleSocket
-
getConnectedSocket
Get the connected socket.- Specified by:
getConnectedSocketin interfaceFemaleSocket- Overrides:
getConnectedSocketin classAbstractFemaleSocket- Returns:
- the male socket or null if not connected
-
isConnected
Is a male socket connected to this female socket?- Specified by:
isConnectedin interfaceFemaleSocket- Overrides:
isConnectedin classAbstractFemaleSocket- Returns:
- true if connected
-
connected
Description copied from interface:FemaleSocketListenerThe socket is connected.- Specified by:
connectedin interfaceFemaleSocketListener- Parameters:
socket- the socket
-
disconnected
Description copied from interface:FemaleSocketListenerThe socket is disconnected.- Specified by:
disconnectedin interfaceFemaleSocketListener- Parameters:
socket- the socket
-
disposeMe
- Specified by:
disposeMein classAbstractFemaleSocket
-