Class AbstractPorts<E extends Port>
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.AbstractPorts<E>
- All Implemented Interfaces:
Ports<E>,Serializable,Iterable<E>
- Direct Known Subclasses:
SimpleInputPorts,SimpleOutputPorts
public abstract class AbstractPorts<E extends Port>
extends Object
implements Ports<E>, Serializable
This class define a basic implementation of a Ports class.
- Since:
- 2.0
- Author:
- Laurent Jourdren
- See Also:
-
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 emptyiterator()intsize()Get the number of ports in the object.toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
-
getPort
Description copied from interface:PortsGet a port. -
contains
Description copied from interface:PortsTest if a port exists. -
contains
Description copied from interface:PortsTest if a port exists by testing if port name exists. -
getPortNames
Description copied from interface:PortsGet the names of the ports- Specified by:
getPortNamesin interfacePorts<E extends Port>- Returns:
- a set with the names of the ports
-
size
public int size()Description copied from interface:PortsGet the number of ports in the object. -
isEmpty
public boolean isEmpty()Description copied from interface:PortsTest if the object is empty -
getFirstPort
Description copied from interface:PortsGet the first port.- Specified by:
getFirstPortin interfacePorts<E extends Port>- Returns:
- a port or null if the object does not contains ports.
-
toString
-
countDataFormat
Description copied from interface:PortsCount the number of occurrences of a format in the port.- Specified by:
countDataFormatin interfacePorts<E extends Port>- Parameters:
format- the format to test- Returns:
- the number of occurrences of the format
-
getPortsWithDataFormat
Description copied from interface:PortsGet a list with all the ports that format is the specified format.- Specified by:
getPortsWithDataFormatin interfacePorts<E extends Port>- Parameters:
format- the format to get- Returns:
- always a list (even empty) of Ports
-