Package net.officefloor.gef.ide.editor
Class AbstractItem.IdeConnection<C extends ConnectionModel>
- java.lang.Object
-
- net.officefloor.gef.ide.editor.AbstractItem.IdeConnection<C>
-
-
Constructor Summary
Constructors Constructor Description IdeConnection(java.lang.Class<C> connectionClass)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractItem.IdeConnection<C>
connectMany(java.util.function.Function<M,java.util.List<C>> sourceToMany, java.util.function.Function<C,M> connToSource, E... sourceChangeEvents)
Connect to many targets.AbstractItem.IdeConnection<C>
connectOne(java.util.function.Function<M,C> sourceToOne, java.util.function.Function<C,M> connToSource, E... sourceChangeEvents)
Connect to one target.<T extends Model,TE extends java.lang.Enum<TE>>
AbstractItem.IdeConnectionTarget<C,T,TE>to(java.lang.Class<T> targetClass)
Connects the target.
-
-
-
Constructor Detail
-
IdeConnection
public IdeConnection(java.lang.Class<C> connectionClass)
Instantiate.- Parameters:
connectionClass
-Class
of theConnectionModel
.
-
-
Method Detail
-
connectMany
@SafeVarargs public final AbstractItem.IdeConnection<C> connectMany(java.util.function.Function<M,java.util.List<C>> sourceToMany, java.util.function.Function<C,M> connToSource, E... sourceChangeEvents)
Connect to many targets.- Parameters:
sourceToMany
- Obtains the multipleConnectionModel
instances from the source.connToSource
- Obtains the source from a particularConnectionModel
.sourceChangeEvents
- Source change events.- Returns:
this
.
-
connectOne
@SafeVarargs public final AbstractItem.IdeConnection<C> connectOne(java.util.function.Function<M,C> sourceToOne, java.util.function.Function<C,M> connToSource, E... sourceChangeEvents)
Connect to one target.- Parameters:
sourceToOne
- Obtains the singleConnectionModel
from the source.connToSource
- Obtains the source from theConnectionModel
.sourceChangeEvents
- Source change events.- Returns:
this
.
-
to
public <T extends Model,TE extends java.lang.Enum<TE>> AbstractItem.IdeConnectionTarget<C,T,TE> to(java.lang.Class<T> targetClass)
Connects the target.- Type Parameters:
T
- TargetModel
type.TE
- TargetModel
event type.- Parameters:
targetClass
- TargetClass
.- Returns:
AbstractItem.IdeConnectionTarget
.
-
-