Class ModelToConnection<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,C extends ConnectionModel>
- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.ModelToConnection<R,O,M,E,C>
-
- Direct Known Subclasses:
ModelToSelfConnection
public class ModelToConnection<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,C extends ConnectionModel> extends java.lang.Object
Model
toConnectionModel
.
-
-
Field Summary
Fields Modifier and Type Field Description protected AdaptedConnectionFactory<R,O,?,?,?>
adaptedConnectionFactory
protected E[]
connectionChangeEvents
Enum
events to indicate change inConnectionModel
instances.protected java.util.function.Function<M,java.util.List<C>>
getConnections
Obtains theConnectionModel
instances.
-
Constructor Summary
Constructors Constructor Description ModelToConnection(java.util.function.Function<M,java.util.List<C>> getConnections, E[] connectionChangeEvents, AdaptedConnectionFactory<R,O,?,?,?> adaptedConnectionFactory)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptedConnectionFactory<R,O,?,?,?>
getAdaptedConnectionFactory()
Obtains theAdaptedConnectionFactory
for theConnectionModel
.E[]
getConnectionChangeEvents()
Obtains theConnectionModel
change eventEnum
instances.java.util.List<C>
getConnections(M model)
Obtains theConnectionModel
instances.
-
-
-
Field Detail
-
getConnections
protected final java.util.function.Function<M extends Model,java.util.List<C extends ConnectionModel>> getConnections
Obtains theConnectionModel
instances.
-
connectionChangeEvents
protected final E extends java.lang.Enum<E>[] connectionChangeEvents
Enum
events to indicate change inConnectionModel
instances.
-
adaptedConnectionFactory
protected final AdaptedConnectionFactory<R extends Model,O,?,?,?> adaptedConnectionFactory
-
-
Constructor Detail
-
ModelToConnection
public ModelToConnection(java.util.function.Function<M,java.util.List<C>> getConnections, E[] connectionChangeEvents, AdaptedConnectionFactory<R,O,?,?,?> adaptedConnectionFactory)
Instantiate.- Parameters:
getConnections
- Obtains theConnectionModel
instances.connectionChangeEvents
-Enum
events to indicate change inConnectionModel
instances.adaptedConnectionFactory
-AdaptedConnectionFactory
to create theConnectionModel
.
-
-
Method Detail
-
getConnections
public java.util.List<C> getConnections(M model)
Obtains theConnectionModel
instances.- Parameters:
model
-Model
.- Returns:
ConnectionModel
instances.
-
getConnectionChangeEvents
public E[] getConnectionChangeEvents()
Obtains theConnectionModel
change eventEnum
instances.- Returns:
ConnectionModel
change eventEnum
instances.
-
getAdaptedConnectionFactory
public AdaptedConnectionFactory<R,O,?,?,?> getAdaptedConnectionFactory()
Obtains theAdaptedConnectionFactory
for theConnectionModel
.- Returns:
AdaptedConnectionFactory
for theConnectionModel
.
-
-