Package org.apache.pekko.stream
Class Shape
java.lang.Object
org.apache.pekko.stream.Shape
- Direct Known Subclasses:
AbstractShape,AmorphousShape,BidiShape,ClosedShape,FanInShape,FanOutShape,FlowShape,SinkShape,SourceShape
A Shape describes the inlets and outlets of a
Graph. In keeping with the
philosophy that a Graph is a freely reusable blueprint, everything that
matters from the outside are the connections that can be made with it,
otherwise it is just a black box.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ShapedeepCopy()Create a copy of this Shape object, returning the same type as the original; this constraint can unfortunately not be expressed in the type system.Java API: get a list of all input portsJava API: get a list of all output portsstatic booleanhasOnePort(scala.collection.immutable.Seq<?> ports) inletsandoutletscan beVectororListso this method checks the size of 1 in an optimized way.booleanCompare this to another shape and determine whether the arrangement of ports is the same (including their ordering).booleanCompare this to another shape and determine whether the set of ports is the same (ignoring their ordering).abstract scala.collection.immutable.Seq<Inlet<?>>inlets()Scala API: get a list of all input portsabstract scala.collection.immutable.Seq<Outlet<?>>outlets()Scala API: get a list of all output portsvoidAsserting version ofhasSamePortsAndShapeAs(org.apache.pekko.stream.Shape).voidAsserting version ofhasSamePortsAs(org.apache.pekko.stream.Shape).
-
Constructor Details
-
Shape
public Shape()
-
-
Method Details
-
hasOnePort
public static boolean hasOnePort(scala.collection.immutable.Seq<?> ports) inletsandoutletscan beVectororListso this method checks the size of 1 in an optimized way. -
inlets
Scala API: get a list of all input ports -
outlets
Scala API: get a list of all output ports -
deepCopy
Create a copy of this Shape object, returning the same type as the original; this constraint can unfortunately not be expressed in the type system. -
getInlets
Java API: get a list of all input ports -
getOutlets
Java API: get a list of all output ports -
hasSamePortsAs
Compare this to another shape and determine whether the set of ports is the same (ignoring their ordering). -
hasSamePortsAndShapeAs
Compare this to another shape and determine whether the arrangement of ports is the same (including their ordering). -
requireSamePortsAs
Asserting version ofhasSamePortsAs(org.apache.pekko.stream.Shape). -
requireSamePortsAndShapeAs
Asserting version ofhasSamePortsAndShapeAs(org.apache.pekko.stream.Shape).
-