Interface Ports<E extends Port>
- All Superinterfaces:
Iterable<E>
- All Known Subinterfaces:
InputPorts,OutputPorts
- All Known Implementing Classes:
AbstractPorts,SimpleInputPorts,SimpleOutputPorts
This interface define a group of ports.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if a port exists by testing if port name exists.booleanTest if a port exists.intcountDataFormat(DataFormat format) Count the number of occurrences of a format in the port.Get the first port.Get a port.Get the names of the portsgetPortsWithDataFormat(DataFormat format) Get a list with all the ports that format is the specified format.booleanisEmpty()Test if the object is emptyintsize()Get the number of ports in the object.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getPort
Get a port.- Parameters:
name- name of the port to get- Returns:
- the port if exists or null
-
contains
Test if a port exists.- Parameters:
name- name of the port to test- Returns:
- true if the port exists
-
contains
Test if a port exists by testing if port name exists.- Parameters:
port- port to test- Returns:
- true if the port exists
-
getPortNames
Get the names of the ports- Returns:
- a set with the names of the ports
-
size
int size()Get the number of ports in the object.- Returns:
- the number of ports
-
isEmpty
boolean isEmpty()Test if the object is empty- Returns:
- true if the object is null
-
countDataFormat
Count the number of occurrences of a format in the port.- Parameters:
format- the format to test- Returns:
- the number of occurrences of the format
-
getPortsWithDataFormat
Get a list with all the ports that format is the specified format.- Parameters:
format- the format to get- Returns:
- always a list (even empty) of Ports
-
getFirstPort
E getFirstPort()Get the first port.- Returns:
- a port or null if the object does not contains ports.
-