Class AbstractNodeEdgeConnector
java.lang.Object
com.dna.jopt.member.unit.nodeedge.AbstractNodeEdgeConnector
- All Implemented Interfaces:
INodeEdgeConnector
,Serializable
- Direct Known Subclasses:
NodeEdgeConnector
public abstract class AbstractNodeEdgeConnector
extends Object
implements INodeEdgeConnector, Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionAbstractNodeEdgeConnector
(IBackupElementConnector backUpConnector) AbstractNodeEdgeConnector
(IBackupElementConnector backUpConnector, IExternalConnectionProvider externalConnectionProvider) AbstractNodeEdgeConnector
(IExternalConnectionProvider externalConnectionProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachSeparatedTestConnectionProvider
(ISeparatedTestConnectionProvider consumableProvider) void
Gets the systems default or user provided backup element connector.getNodeConnection
(String from, String too) Gets a specific node connection between twoIOptimizationElement
ids.Gets all connections as a list instead of a table.protected com.google.common.collect.Table<String,
String, INodeConnectorItem> boolean
hasConnectionToOrFrom
(String elementId) void
putNodeConnection
(INodeConnectorItem connection) Puts a single node connection.void
putNodeConnection
(String from, String too, INodeConnectorItem connection) Deprecated.void
putNodeConnectionIfNotExisting
(INodeConnectorItem connection) Put node connection if not existing.void
putNodeConnectionIfNotExisting
(String from, String too, INodeConnectorItem connection) Deprecated.please useputNodeConnectionIfNotExisting(INodeConnectorItem)
insteadvoid
putNodeConnections
(List<INodeConnectorItem> connections) Puts a list of connections to be stored in the table.void
putNodeConnectionsIfNotExisting
(List<INodeConnectorItem> connections) void
setBackupElementConnector
(IBackupElementConnector backUpConnector) Sets theIBackupElementConnector
which is used if theINodeEdgeConnector
cannot find a requested connection.void
setExternalConnectionProvider
(IExternalConnectionProvider externalConnectionProvider) void
setNodeConnections
(com.google.common.collect.Table<String, String, INodeConnectorItem> table) Sets the node connections table.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.nodeedge.INodeEdgeConnector
cleanUp, getNodeConnection, getNodeConnection, refactorNodeConnectorConnection, removeConnection, removeConnection, removeConnectionFromElements
-
Constructor Details
-
AbstractNodeEdgeConnector
public AbstractNodeEdgeConnector() -
AbstractNodeEdgeConnector
-
AbstractNodeEdgeConnector
-
AbstractNodeEdgeConnector
public AbstractNodeEdgeConnector(IBackupElementConnector backUpConnector, IExternalConnectionProvider externalConnectionProvider)
-
-
Method Details
-
getNodeConnectorTable
-
setNodeConnections
public void setNodeConnections(com.google.common.collect.Table<String, String, INodeConnectorItem> table) Description copied from interface:INodeEdgeConnector
Sets the node connections table.- Specified by:
setNodeConnections
in interfaceINodeEdgeConnector
- Parameters:
table
- the table
-
setBackupElementConnector
Description copied from interface:INodeEdgeConnector
Sets theIBackupElementConnector
which is used if theINodeEdgeConnector
cannot find a requested connection. TheIBackupElementConnector
defines how the item is created.By default the
DefaultFlatEarthAverageSpeedBackupElementConnector
is used.- Specified by:
setBackupElementConnector
in interfaceINodeEdgeConnector
- Parameters:
backUpConnector
- the iBackupElementConnector which is used as a fall back
-
getBackupElementConnector
Description copied from interface:INodeEdgeConnector
Gets the systems default or user provided backup element connector.- Specified by:
getBackupElementConnector
in interfaceINodeEdgeConnector
- Returns:
- the backup element connector
-
setExternalConnectionProvider
- Specified by:
setExternalConnectionProvider
in interfaceINodeEdgeConnector
-
getExternalConnectionProvider
- Specified by:
getExternalConnectionProvider
in interfaceINodeEdgeConnector
-
attachSeparatedTestConnectionProvider
public void attachSeparatedTestConnectionProvider(ISeparatedTestConnectionProvider consumableProvider) - Specified by:
attachSeparatedTestConnectionProvider
in interfaceINodeEdgeConnector
-
getSeparatedTestConnectionProvider
- Specified by:
getSeparatedTestConnectionProvider
in interfaceINodeEdgeConnector
-
dropSeparatedTestConnectionProvider
public void dropSeparatedTestConnectionProvider()- Specified by:
dropSeparatedTestConnectionProvider
in interfaceINodeEdgeConnector
-
getNodeConnection
Description copied from interface:INodeEdgeConnector
Gets a specific node connection between twoIOptimizationElement
ids. In case the connections was not provided by the user theIBackupElementConnector
is used to create the connection.- Specified by:
getNodeConnection
in interfaceINodeEdgeConnector
- Parameters:
from
- the fromtoo
- the too- Returns:
- the node connection
-
hasConnectionToOrFrom
- Specified by:
hasConnectionToOrFrom
in interfaceINodeEdgeConnector
-
getNodeConnections
Description copied from interface:INodeEdgeConnector
Gets all connections as a list instead of a table.- Specified by:
getNodeConnections
in interfaceINodeEdgeConnector
- Returns:
- the node connections
-
putNodeConnections
Description copied from interface:INodeEdgeConnector
Puts a list of connections to be stored in the table. Already present connections (identified via the unique ids of the connection memberIOptimizationElement
) are replaced.- Specified by:
putNodeConnections
in interfaceINodeEdgeConnector
- Parameters:
connections
- the connections
-
putNodeConnection
Description copied from interface:INodeEdgeConnector
Puts a single node connection. An already present connection (identified via the unique ids of the connection memberIOptimizationElement
) is replaced.- Specified by:
putNodeConnection
in interfaceINodeEdgeConnector
- Parameters:
connection
- the connection
-
putNodeConnectionsIfNotExisting
- Specified by:
putNodeConnectionsIfNotExisting
in interfaceINodeEdgeConnector
-
putNodeConnectionIfNotExisting
Description copied from interface:INodeEdgeConnector
Put node connection if not existing. An already present connection (identified via the unique ids of the connection memberIOptimizationElement
) is kept.- Specified by:
putNodeConnectionIfNotExisting
in interfaceINodeEdgeConnector
- Parameters:
connection
- the connection
-
putNodeConnection
Deprecated.please useputNodeConnection(INodeConnectorItem)
insteadDeprecated method- Specified by:
putNodeConnection
in interfaceINodeEdgeConnector
- Parameters:
from
- string start locationtoo
- string end locationconnection
- the iNodeConnectoritem to write start and end locations to
-
putNodeConnectionIfNotExisting
@Deprecated public void putNodeConnectionIfNotExisting(String from, String too, INodeConnectorItem connection) Deprecated.please useputNodeConnectionIfNotExisting(INodeConnectorItem)
insteadDeprecated method- Specified by:
putNodeConnectionIfNotExisting
in interfaceINodeEdgeConnector
- Parameters:
from
- string start locationtoo
- string end locationconnection
- the iNodeConnectoritem to write start and end locations to
-
putNodeConnection(INodeConnectorItem)
instead