Package jmri.jmrit.logixng
Interface FemaleSocket
- All Superinterfaces:
Base,PropertyChangeProvider
- All Known Subinterfaces:
FemaleAnalogActionSocket,FemaleAnalogExpressionSocket,FemaleAnySocket,FemaleDigitalActionSocket,FemaleDigitalBooleanActionSocket,FemaleDigitalExpressionSocket,FemaleGenericExpressionSocket,FemaleStringActionSocket,FemaleStringExpressionSocket
- All Known Implementing Classes:
AbstractFemaleSocket,DefaultFemaleAnalogActionSocket,DefaultFemaleAnalogExpressionSocket,DefaultFemaleAnySocket,DefaultFemaleDigitalActionSocket,DefaultFemaleDigitalBooleanActionSocket,DefaultFemaleDigitalExpressionSocket,DefaultFemaleGenericExpressionSocket,DefaultFemaleStringActionSocket,DefaultFemaleStringExpressionSocket
A LogixNG female expression socket.
A Expression or a Action that has children must not use
these directly but instead use a FemaleSocket.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException -
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanCan a connected socket be disconnected?voidconnect(MaleSocket socket) Connect the male socket to this female socket.voidDisconnect the current connected male socket from this female socket.default voidDo an operation on this socketGet a set of classes that are compatible with this female socket.Get the connected socket.booleanGets whenever listeners are enabled or not.getName()Get the name of this socket.default booleanisAncestor(MaleSocket maleSocket) Am I an ancestor to this maleSocket?booleanisCompatible(MaleSocket socket) Is a particular male socket compatible with this female socket?booleanIs a male socket connected to this female socket?default booleanIs the operation allowed on this socket?voidsetEnableListeners(boolean enable) Sets whenever listeners are enabled or not.default voidSet the name of this socket.voidSet the name of this socket.default voidsetup()Setup this object and its children.default booleanvalidateName(String name) Validates a name for a FemaleSocket.booleanvalidateName(String name, boolean ignoreDuplicateErrors) Validates a name for a FemaleSocket.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, getLongDescription, getModule, getNumPropertyChangeListeners, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, 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.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Method Details
-
connect
Connect the male socket to this female socket.- Parameters:
socket- the socket to connect- Throws:
SocketAlreadyConnectedException- if the socket is already connected
-
disconnect
void disconnect()Disconnect the current connected male socket from this female socket. -
canDisconnect
Can a connected socket be disconnected?- Returns:
- true if the socket can be disconnected, false otherwise
-
getConnectedSocket
Get the connected socket.- Returns:
- the male socket or null if not connected
-
isConnected
boolean isConnected()Is a male socket connected to this female socket?- Returns:
- true if connected
-
isCompatible
Is a particular male socket compatible with this female socket?- Parameters:
socket- the male socket- Returns:
- true if the male socket can be connected to this female socket
-
validateName
Validates a name for a FemaleSocket.The name must have at least one character and only alphanumeric characters. The first character must not be a digit.
- Parameters:
name- the name- Returns:
- true if the name is valid, false otherwise
-
validateName
Validates a name for a FemaleSocket.The name must have at least one character and only alphanumeric characters. The first character must not be a digit.
- Parameters:
name- the nameignoreDuplicateErrors- true if duplicate names should be ignored, false otherwise- Returns:
- true if the name is valid, false otherwise
-
setName
Set the name of this socket.The name must have at least one character and only alphanumeric characters. The first character must not be a digit.
- Parameters:
name- the name
-
setName
Set the name of this socket.The name must have at least one character and only alphanumeric characters. The first character must not be a digit.
- Parameters:
name- the nameignoreDuplicateErrors- true if duplicate names should be ignored, false otherwise
-
getName
Get the name of this socket.- Returns:
- the name
-
isSocketOperationAllowed
Is the operation allowed on this socket?- Parameters:
oper- the operation to do- Returns:
- true if operation is allowed, false otherwise
-
doSocketOperation
Do an operation on this socket- Parameters:
oper- the operation to do
-
setEnableListeners
Sets whenever listeners are enabled or not. ConditionalNG has always listeners enabled, but Clipboard and Module has never listeners enabled.- Parameters:
enable- true if listeners should be enabled, false otherwise
-
getEnableListeners
boolean getEnableListeners()Gets whenever listeners are enabled or not. ConditionalNG has always listeners enabled, but Clipboard and Module has never listeners enabled.- Returns:
- true if listeners should be enabled, false otherwise
-
isAncestor
Am I an ancestor to this maleSocket?- Parameters:
maleSocket- the maleSocket that could be a child- Returns:
- true if this oject is an ancestor to the maleSocket object
-
getConnectableClasses
Get a set of classes that are compatible with this female socket.- Returns:
- a set of entries with category and class
-
setup
Setup this object and its children. This method is used to lookup system names for child sockets, turnouts, sensors, and so on.
-