java.lang.Object
org.praxislive.core.Value
org.praxislive.core.types.PArray.ArrayBasedValue
org.praxislive.core.Connection
A type representing a connection between two ports.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.praxislive.core.Value
Value.Type<T extends Value> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<Connection> Coerce the provided value into a Connection if possible.static ConnectionCreate a connection reference.Query the component ID of the source component.Query the port ID of the source port.Query the component ID of the target component.Query the port ID of the target port.Methods inherited from class org.praxislive.core.types.PArray.ArrayBasedValue
dataArray, equals, equivalent, hashCode, toString
-
Field Details
-
TYPE_NAME
Value type name.- See Also:
-
-
Method Details
-
sourceComponent
Query the component ID of the source component.- Returns:
- ID of first child
-
sourcePort
Query the port ID of the source port.- Returns:
- ID of port on first child
-
targetComponent
Query the component ID of the target component.- Returns:
- ID of the second child
-
targetPort
Query the port ID of the target port.- Returns:
- ID of port on second child
-
of
Create a connection reference. The child IDs must be valid according toComponentAddress.isValidID(java.lang.String). The port IDs must be valid according toPortAddress.isValidID(java.lang.String).- Parameters:
child1- ID of first childport1- ID of port on first childchild2- ID of second childport2- ID of port on second child- Returns:
- new connection
- Throws:
IllegalArgumentException- if the IDs are not valid
-
from
Coerce the provided value into a Connection if possible.- Parameters:
value- value of unknown type- Returns:
- connection or empty optional
-